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