diff --git a/sports-matcher/src/App.js b/sports-matcher/src/App.js index 04fc368..f6ab87b 100644 --- a/sports-matcher/src/App.js +++ b/sports-matcher/src/App.js @@ -4,6 +4,7 @@ import SignIn from './SignIn'; import SignUp from './SignUp'; import Admin from './Admin'; import Home from './Home'; +import ChatWindow from './ChatWindow'; function App() { return (
@@ -12,6 +13,7 @@ function App() { } /> } /> } /> + } />
); diff --git a/sports-matcher/src/Navbar.js b/sports-matcher/src/Navbar.js index 3b3373c..c9f0fe1 100644 --- a/sports-matcher/src/Navbar.js +++ b/sports-matcher/src/Navbar.js @@ -108,7 +108,7 @@ export default function Navbar() { - + { navigate('/chat-window') }} sx={{ p: 0 }}> diff --git a/sports-matcher/src/SignIn.js b/sports-matcher/src/SignIn.js index a5df9a6..10b9625 100644 --- a/sports-matcher/src/SignIn.js +++ b/sports-matcher/src/SignIn.js @@ -16,60 +16,63 @@ export default function SignIn() { event.preventDefault(); const data = new FormData(event.currentTarget); // eslint-disable-next-line no-console - if(data.get('username') == "admin" && data.get('password') == "admin"){ - navigate('/'); + if (data.get('username') === "admin" && data.get('password') === "admin") { + navigate('/admin'); + } else if (data.get('username') === "user" && data.get('password') === "user") { + navigate('/chat-window') } }; return ( - - - - - - - - Sign in - - - - - - + + + + + + + + Sign in + + + + + + {"Don't have an account?"} - - - - - )} \ No newline at end of file + + + + + ) +} \ No newline at end of file