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
4 changes: 2 additions & 2 deletions apps/client/src/app/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const Router = () => {
return (
<BrowserRouter>
<Routes>
<Route
{/* <Route

Choose a reason for hiding this comment

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

why is it commented? Also the login/register screen shouldn't have header

element={
<LoggedOutRoute>
<BaseScreen />
Expand All @@ -48,7 +48,7 @@ export const Router = () => {
path={`${ROUTES.ACTIVATE_ACCOUNT}/:token`}
element={<ActivateAccount />}
/>
</Route>
</Route> */}

<Route
element={
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import CheckRoundedIcon from '@mui/icons-material/CheckRounded';
import Avatar from '@mui/material/Avatar';
import Box from '@mui/material/Box';
import styled from '@emotion/styled';

export const StyledPageBox = styled(Box)`
margin: 80px 0 0;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
`;
export const StyledAvatar = styled(Avatar)`
margin-bottom: 30px;
background-color: #4caf50;
width: 70px;
height: 70px;
@media (max-width: 480px) {
width: 50px;
height: 50px;
}
`;
export const StyledAvatarCheck = styled(CheckRoundedIcon)`
font-size: 48px;
color: #fff;
@media (max-width: 480px) {
font-size: 36px;
}
`;
18 changes: 17 additions & 1 deletion apps/client/src/app/sceens/ActivateAccount/ActivateAccount.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
import Typography from '@mui/material/Typography';
import {
StyledPageBox,
StyledAvatar,
StyledAvatarCheck,
} from './ActivateAccount.style';

export const ActivateAccount = () => {
return <div>ActivateAccount</div>;
return (
<StyledPageBox>
<StyledAvatar>
<StyledAvatarCheck />
</StyledAvatar>
<Typography component='h1' variant='h4'>
Congrats, successfully confirmation mail
</Typography>
</StyledPageBox>
);
};
47 changes: 47 additions & 0 deletions apps/client/src/app/sceens/Home/Home.style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import RestaurantMenuRoundedIcon from '@mui/icons-material/RestaurantMenuRounded';
import { Box, Fab, Typography } from '@mui/material';
import Button from '@mui/material/Button';
import { NavLink } from 'react-router-dom';
import styled from '@emotion/styled';

export const StyledPageBox = styled(Box)`
display: flex;
flex-direction: column;
align-items: center;
margin-top: 40px;
@media (max-width: 480px) {
margin-top: 80px;
}
`;
export const StyledLogoBox = styled(Box)`
display: flex;
flex-direction: row;
margin-top: 20px;
align-items: center;
`;
export const StyledFabLogo = styled(Fab)`
width: 50px;
height: 50px;
margin-left: 20px;
cursor: unset;
`;
export const StyledIconLogo = styled(RestaurantMenuRoundedIcon)`
font-size: 42px;
color: #fff;
`;
export const StyledFirstTypography = styled(Typography)`
text-align: center;
margin: 20px auto;
`;
export const StyledLinkText = styled(NavLink)`
text-decoration: none;
width: 90%;
`;
export const StyledNavButton = styled(Button)`
width: 100%;
color: #fff;
`;
export const StyledSecondTypography = styled(Typography)`
text-align: center;
margin: 10px auto;
`;
57 changes: 11 additions & 46 deletions apps/client/src/app/sceens/Home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,51 +1,16 @@
import RestaurantMenuRoundedIcon from '@mui/icons-material/RestaurantMenuRounded';
import { Box, Fab, Typography } from '@mui/material';
import Button from '@mui/material/Button';
import { NavLink } from 'react-router-dom';
import { Typography } from '@mui/material';
import { ROUTES } from '../../routes/Routes';
import styled from '@emotion/styled';

const StyledPageBox = styled(Box)`
display: flex;
flex-direction: column;
align-items: center;
margin-top: 40px;
@media (max-width: 480px) {
margin-top: 80px;
}
`;
const StyledLogoBox = styled(Box)`
display: flex;
flex-direction: row;
margin-top: 20px;
align-items: center;
`;
const StyledFabLogo = styled(Fab)`
width: 50px;
height: 50px;
margin-left: 20px;
cursor: unset;
`;
const StyledIconLogo = styled(RestaurantMenuRoundedIcon)`
font-size: 42px;
color: #fff;
`;
const StyledFirstTypography = styled(Typography)`
text-align: center;
margin: 20px auto;
`;
const StyledLinkText = styled(NavLink)`
text-decoration: none;
width: 90%;
`;
const StyledNavButton = styled(Button)`
width: 100%;
color: #fff;
`;
const StyledSecondTypography = styled(Typography)`
text-align: center;
margin: 10px auto;
`;
import {
StyledPageBox,
StyledLogoBox,
StyledFabLogo,
StyledIconLogo,
StyledFirstTypography,
StyledLinkText,
StyledNavButton,
StyledSecondTypography,
} from './Home.style';

export const Home = () => {
return (
Expand Down
64 changes: 64 additions & 0 deletions apps/client/src/app/sceens/Login/Login.style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import Lock from '@mui/icons-material/Lock';
import Avatar from '@mui/material/Avatar';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import TextField from '@mui/material/TextField';
import Typography from '@mui/material/Typography';
import { NavLink } from 'react-router-dom';
import styled from '@emotion/styled';

export const StyledPageBox = styled(Box)`
display: flex;
flex-direction: column;
align-items: center;
`;
export const StyledSectionBox = styled(Box)`
margin: 80px 0 0;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
width: 90%;
`;
export const StyledAvatar = styled(Avatar)`
margin: 8px;
background-color: #4caf50;
width: 70px;
height: 70px;
@media (max-width: 480px) {
width: 40px;
height: 40px;
}
`;
export const StyledAvatarLock = styled(Lock)`
font-size: 48px;
color: #fff;
@media (max-width: 480px) {
font-size: 24px;
}
`;
export const StyledTypography = styled(Typography)`
@media (max-width: 480px) {
font-size: 24px;
}
`;
export const StyledFormTextField = styled(TextField)`
width: 100%;
margin: 10px 0;
`;
export const StyledErrorDiv = styled(Box)`
color: #ff0000;
`;
export const StyledSignButton = styled(Button)`
width: 100%;
color: #fff;
`;
export const StyledBottomSection = styled(Box)`
display: flex;
justify-content: space-between;
width: 100%;
margin-top: 30px;
`;
export const StyledNavLink = styled(NavLink)`
color: #000;
`;
64 changes: 63 additions & 1 deletion apps/client/src/app/sceens/Login/Login.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
import {
StyledPageBox,
StyledSectionBox,
StyledAvatar,
StyledAvatarLock,
StyledTypography,
StyledFormTextField,
StyledErrorDiv,
StyledSignButton,
StyledBottomSection,
StyledNavLink,
} from './Login.style';

import { ROUTES } from '../../routes/Routes';
import { useState } from 'react';

export const Login = () => {
return <div>Login</div>;
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');

return (
<StyledPageBox>
<StyledSectionBox>
<StyledAvatar>
<StyledAvatarLock />
</StyledAvatar>

<StyledTypography variant='h4'>Sign in</StyledTypography>

<form onSubmit={() => console.log('sent')}>
<StyledFormTextField
variant='outlined'
required
label='Email'
value={email}
onChange={(e) => setEmail(e.target.value)}
autoComplete='email'
/>
<StyledFormTextField
variant='outlined'
required
label='Password'
value={password}
onChange={(e) => setPassword(e.target.value)}
type='password'
autoComplete='current-password'
/>
<StyledErrorDiv className='invalid-feedback'></StyledErrorDiv>
<StyledSignButton variant='contained' type='submit'>
Sign In
</StyledSignButton>
</form>

<StyledBottomSection>
<StyledNavLink to={ROUTES.REQUEST_PASSWORD_RESET}>
Forgot password?
</StyledNavLink>
<StyledNavLink to={ROUTES.REGISTER}>
Don't have an account? Sign up
</StyledNavLink>
</StyledBottomSection>
</StyledSectionBox>
</StyledPageBox>
);
};
71 changes: 71 additions & 0 deletions apps/client/src/app/sceens/Register/Register.style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import Lock from '@mui/icons-material/Lock';
import Avatar from '@mui/material/Avatar';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import TextField from '@mui/material/TextField';
import styled from '@emotion/styled';
import { NavLink } from 'react-router-dom';

export const StyledPageBox = styled(Box)`
display: flex;
flex-direction: column;
align-items: center;
`;
export const StyledSectionBox = styled(Box)`
margin: 80px 0 0;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
width: 90%;
`;
export const StyledAvatar = styled(Avatar)`
margin: 8px;
background-color: #4caf50;
width: 70px;
height: 70px;
@media (max-width: 480px) {
width: 40px;
height: 40px;
}
`;
export const StyledAvatarLock = styled(Lock)`
font-size: 48px;
color: #fff;
@media (max-width: 480px) {
font-size: 24px;
}
`;
export const StyledInputsName = styled(Box)`
width: 100%;
display: ;flex;
flex-direciotn: row;
margin: 10px 0;
`;
export const StyledFormTextFieldName = styled(TextField)`
width: 50%;
`;
export const StyledFormTextField = styled(TextField)`
width: 100%;
margin: 10px 0;
`;
export const StyledFormTextFieldBirtday = styled(TextField)`
width: 100%;
margin: 10px 0;
`;
export const StyledErrorDiv = styled(Box)`
color: red;
`;
export const StyledButtonSign = styled(Button)`
width: 100%;
color: #fff;
`;
export const StyledSectionBottom = styled(Box)`
display: flex;
justify-content: flex-end;
width: 100%;
margin-top: 2rem;
`;
export const StyledNavLink = styled(NavLink)`
color: #000;
`;
Loading