mirror of
https://github.com/lemeow125/Reactnative-notesapp.git
synced 2025-06-28 16:35:44 +08:00
Added public notes functionality to homepage
This commit is contained in:
parent
a452c0e329
commit
fad68bd97f
2 changed files with 58 additions and 2 deletions
|
@ -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 />;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue