Added public notes functionality to homepage

This commit is contained in:
Keannu Christian Bernasol 2023-04-14 22:03:18 +08:00
parent a452c0e329
commit fad68bd97f
2 changed files with 58 additions and 2 deletions

View file

@ -5,13 +5,14 @@ import Background from "../../Components/Background/Background";
import Notes from "../../Components/Notes/Notes";
import { Switch } from "react-native-gesture-handler";
import { useState } from "react";
import PublicNotes from "../../Components/PublicNotes/Notes";
export default function Home() {
const [switchLabel, setLabel] = useState("Viewing public notes");
const [togglePublic, setToggled] = useState(false);
const [togglePublic, setToggled] = useState(true);
function Preview() {
if (togglePublic) {
return <Text>Viewing public notes</Text>;
return <PublicNotes />;
} else {
return <Notes />;
}