diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index ad2063a..3254ae1 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -5,6 +5,7 @@ import AppLayout from './pages/AppLayout'; import Error from './pages/Error'; import Game from './pages/Game'; import About from './pages/About'; +import Login from './pages/Login'; const router = createBrowserRouter([ { @@ -22,6 +23,8 @@ const router = createBrowserRouter([ }, { path: '/about', element: }, { path: '/error', element: }, + { path: '/login', element: }, + { path: '/signin', element: } ], }, ]); diff --git a/frontend/src/Navbar.tsx b/frontend/src/Navbar.tsx index b5b59e8..1f484fd 100644 --- a/frontend/src/Navbar.tsx +++ b/frontend/src/Navbar.tsx @@ -33,14 +33,23 @@ const Navbar: React.FC = ({ /> -
-
+ {isLoggedIn ? ( + <> + + + ) : ( + <> +
+
+ + )} + {isOpen && (
diff --git a/frontend/src/library/button.tsx b/frontend/src/library/button.tsx index c9ba58a..af848eb 100644 --- a/frontend/src/library/button.tsx +++ b/frontend/src/library/button.tsx @@ -15,6 +15,7 @@ type ButtonProps = { fontSize?: string; rounded?: string; buttonSize?: string; + type?: "submit" | "reset" | "button" borderColor?: string; hoverColor?: string; hoverScale?: boolean; @@ -36,11 +37,13 @@ const Button: React.FC = ({ borderColor = 'border-black', hoverColor = 'hover:bg-lime-600', hoverScale = true, + type = 'button', onClick, className = '', }) => { return (
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+ Don't have an account? Sign in +
+
+
+ + + + + ); +}; + +export default Login; \ No newline at end of file