Skip to content

Commit

Permalink
added nav and footer for login/sing up view
Browse files Browse the repository at this point in the history
  • Loading branch information
uo288574 committed Apr 4, 2024
1 parent 16df92e commit 03cd087
Showing 1 changed file with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions webapp/src/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import React, { useState } from 'react';
import AddUser from './components/AddUser';
import Login from './components/Login';
import { Footer } from './components/footer/Footer';
import { Nav } from './components/nav/Nav';
import Container from '@mui/material/Container';
import Typography from '@mui/material/Typography';
import { Footer } from './components/footer/Footer';

function App() {
const [showLogin, setShowLogin] = useState(true);
Expand All @@ -12,21 +15,27 @@ function App() {
};

return (
<Container component="main" maxWidth="xs">
<h1>Welcome to wiq_06c</h1>
{showLogin ? <Login /> : <AddUser />}
<Typography component="div" align="center" sx={{ marginTop: 2 }}>
{showLogin ? (
<a name="gotoregister" onClick={handleToggleView}>
Don't have an account? Register here.
</a>
) : (
<a onClick={handleToggleView}>
Already have an account? Login here.
</a>
)}
</Typography>
</Container>
<>
<Nav />

<Container component="main" maxWidth="xs">
<h1>Welcome to wiq_06c</h1>
{showLogin ? <Login /> : <AddUser />}
<Typography component="div" align="center" sx={{ marginTop: 2 }}>
{showLogin ? (
<a name="gotoregister" onClick={handleToggleView}>
Don't have an account? Register here.
</a>
) : (
<a onClick={handleToggleView}>
Already have an account? Login here.
</a>
)}
</Typography>
</Container>

<Footer />
</>
);
}

Expand Down

0 comments on commit 03cd087

Please sign in to comment.