diff --git a/pages/index.js b/pages/index.js index c78e9ca..cbb083c 100644 --- a/pages/index.js +++ b/pages/index.js @@ -112,11 +112,14 @@ export default class Home extends Component { } render() { + console.log(this.state.steamId); return this.state.loading ? (

Loading...

) : (
- + - BeatSaber Overlay - Welcome to the Setup panel + + BeatSaber Overlay + + + Welcome to the Setup panel +
- + diff --git a/src/components/Navbar.js b/src/components/Navbar.js index afebcda..db60231 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -1,6 +1,7 @@ import { Navbar, Text } from "@nextui-org/react"; +import Settings from "./Settings"; -const NavBar = () => { +const NavBar = (props) => { return ( @@ -8,6 +9,10 @@ const NavBar = () => { BeatSaber Overlay + + + + ); }; diff --git a/src/components/Settings.js b/src/components/Settings.js new file mode 100644 index 0000000..50ff349 --- /dev/null +++ b/src/components/Settings.js @@ -0,0 +1,52 @@ +import { + Avatar as NextAvatar, + changeTheme, + Dropdown, + Text, + useTheme, +} from "@nextui-org/react"; + +const Avatar = (props) => { + const { isDark } = useTheme(); + + const avatarUrl = + props.avatarUrl || "https://cdn.fascinated.cc/IkQFyodbZv.jpg?raw=true"; + + const handleChange = () => { + const nextTheme = isDark ? "light" : "dark"; + window.localStorage.setItem("theme", nextTheme); // you can use any storage + changeTheme(nextTheme); + }; + + return ( + <> + + + + + + +
+ handleChange()}> + Toggle Dark Mode + +
+
+
+
+ + ); +}; + +export default Avatar;