Fixed access to dashboard page.
This commit is contained in:
parent
5c7e26a1a9
commit
fba8212aeb
@ -5,11 +5,14 @@ import SignUp from './SignUp';
|
||||
import Admin from './Admin';
|
||||
import Home from './Home';
|
||||
import ChatWindow from './ChatWindow';
|
||||
import UserDashboard from "./UserDashboard";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Routes>
|
||||
<Route path="" element={<Home />} />
|
||||
<Route path="dashboard" element={<UserDashboard />} />
|
||||
<Route path="sign-in" element={<SignIn />} />
|
||||
<Route path="sign-up" element={<SignUp />} />
|
||||
<Route path="admin" element={<Admin />} />
|
||||
|
@ -95,15 +95,12 @@ export default function Navbar() {
|
||||
Sports Matcher
|
||||
</Typography>
|
||||
<Box sx={{ flexGrow: 1, display: { xs: 'none', md: 'flex' }, marginLeft: '2%' }}>
|
||||
{pages.map((page) => (
|
||||
<Button
|
||||
key={page}
|
||||
onClick={handleCloseNavMenu}
|
||||
sx={{ my: 2, color: 'white', display: 'block', textTransform: 'none', fontSize: '100%' }}
|
||||
>
|
||||
{page}
|
||||
</Button>
|
||||
))}
|
||||
<Button
|
||||
onClick={() => { navigate("/dashboard") }}
|
||||
sx={{ my: 2, color: 'white', display: 'block', textTransform: 'none', fontSize: '100%' }}
|
||||
>
|
||||
Dashboard
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
<Box sx={{ flexGrow: 0, marginRight: '1%' }}>
|
||||
|
@ -12,11 +12,13 @@ import Filter from "./Filter";
|
||||
import SearchBar from "./SearchBar";
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import MatchesList from './MatchesList';
|
||||
import Navbar from './Navbar';
|
||||
|
||||
export default function UserDashboard() {
|
||||
const navigate = useNavigate();
|
||||
return (
|
||||
<div>
|
||||
<Navbar></Navbar>
|
||||
<SearchBar></SearchBar>
|
||||
<Filter></Filter>
|
||||
<MatchesList></MatchesList>
|
||||
|
Loading…
Reference in New Issue
Block a user