Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57,797 changes: 29,118 additions & 28,679 deletions my-app/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion my-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"react-scripts": "^2.1.3",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
36 changes: 19 additions & 17 deletions my-app/src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
import React from 'react';
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yessir

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was breaking without it for me at least

import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import MatchingScreen from './screens/matchingScreen/MatchingScreen.jsx';
import SignUp from './components/SignUp/SignUp.jsx'
import SignIn from "./components/SignIn/SignIn.jsx";
import "./App.css"
import SignUp from './screens/signUp/SignUp.jsx';
import Login from './screens/signUp/login/Login.jsx';
import './App.css';
import NavBar from './components/NavBar';

function App() {
return (
<>
<NavBar />
<div className="App">
<Router>
<Routes>
<Route path="/matchingScreen" element={<MatchingScreen />} />
<Route path="/signUp" element={<SignUp />}/>
<Route path="/signIn" element={<SignIn />}/>
</Routes>
</Router>
</div>
</>
);
return (
<>
<NavBar />
<div className="App">
<Router>
<Routes>
<Route path="/" element={<MatchingScreen />} />
<Route path="/match" element={<MatchingScreen />} />
<Route path="/signUp" element={<SignUp />} />
<Route path="/login" element={<Login />} />
</Routes>
</Router>
</div>
</>
);
}

export default App;
1 change: 1 addition & 0 deletions my-app/src/components/MatchingCard/MatchingCard.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import {
Card,
CardContent,
Expand Down
112 changes: 64 additions & 48 deletions my-app/src/components/NavBar/NavBar.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { useState } from 'react';
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
Expand All @@ -13,57 +15,71 @@ import MenuItem from '@mui/material/MenuItem';
const settings = ['Profile', 'Logout'];

const NavBar = () => {
const [anchorElUser, setAnchorElUser] = useState(null);

const handleOpenUserMenu = (event) => {
setAnchorElUser(event.currentTarget);
};
const [anchorElUser, setAnchorElUser] = useState(null);

const handleCloseUserMenu = () => {
setAnchorElUser(null);
};
const handleOpenUserMenu = event => {
setAnchorElUser(event.currentTarget);
};

return (
<AppBar position="static">
<Container maxWidth="xl">
<Toolbar disableGutters>
const handleCloseUserMenu = () => {
setAnchorElUser(null);
};

<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
Home
</Typography>
return (
<AppBar position="static">
<Container maxWidth="xl">
<Toolbar disableGutters>
<Typography
variant="h6"
component="div"
sx={{ flexGrow: 1 }}
>
Home
</Typography>

<Box sx={{ flexGrow: 0 }}>
<Tooltip title="Open settings">
<IconButton onClick={handleOpenUserMenu} sx={{ p: 0 }}>
<Avatar alt="Jia" src="/static/images/avatar/2.jpg" />
</IconButton>
</Tooltip>
<Menu
sx={{ mt: '45px' }}
id="menu-appbar"
anchorEl={anchorElUser}
anchorOrigin={{
vertical: 'top',
horizontal: 'right',
}}
keepMounted
transformOrigin={{
vertical: 'top',
horizontal: 'right',
}}
open={Boolean(anchorElUser)}
onClose={handleCloseUserMenu}
>
{settings.map((setting) => (
<MenuItem key={setting} onClick={handleCloseUserMenu}>
<Typography textAlign="center">{setting}</Typography>
</MenuItem>
))}
</Menu>
</Box>
</Toolbar>
</Container>
</AppBar>
);
<Box sx={{ flexGrow: 0 }}>
<Tooltip title="Open settings">
<IconButton
onClick={handleOpenUserMenu}
sx={{ p: 0 }}
>
<Avatar
alt="Jia"
src={localStorage.getItem('image')}
/>
</IconButton>
</Tooltip>
<Menu
sx={{ mt: '45px' }}
id="menu-appbar"
anchorEl={anchorElUser}
anchorOrigin={{
vertical: 'top',
horizontal: 'right'
}}
keepMounted
transformOrigin={{
vertical: 'top',
horizontal: 'right'
}}
open={Boolean(anchorElUser)}
onClose={handleCloseUserMenu}
>
{settings.map(setting => (
<MenuItem
key={setting}
onClick={handleCloseUserMenu}
>
<Typography textAlign="center">
{setting}
</Typography>
</MenuItem>
))}
</Menu>
</Box>
</Toolbar>
</Container>
</AppBar>
);
};
export default NavBar;
110 changes: 0 additions & 110 deletions my-app/src/components/SignIn/SignIn.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions my-app/src/components/SignIn/index.js

This file was deleted.

Loading