-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from StartUpNationLabs/fix-landing-page
fix: landing page
- Loading branch information
Showing
8 changed files
with
337 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,41 @@ | ||
import { CenterFocusStrong } from '@mui/icons-material'; | ||
import './landingPage.css'; | ||
import { useNavigate } from "react-router-dom"; | ||
import {useNavigate} from "react-router-dom"; | ||
import TableSquare from './tableSquare'; | ||
import { Button, Typography, Grid2, Box } from "@mui/material"; | ||
import {Button, Typography, Box, Grid2 as Grid} from "@mui/material"; | ||
import * as React from 'react'; | ||
import { useState } from 'react'; | ||
import { Router } from 'react-router-dom'; | ||
import {useState} from 'react'; | ||
|
||
export function LandingPage() { | ||
const [totalPeople, setTotalPeople] = useState(0); | ||
const navigate = useNavigate(); | ||
const [totalPeople, setTotalPeople] = useState(0); | ||
const navigate = useNavigate(); | ||
|
||
const validateTables = () => { | ||
console.log({totalPeople}) | ||
navigate("/offers") | ||
} | ||
const validateTables = () => { | ||
console.log({totalPeople}) | ||
navigate("/offers") | ||
} | ||
|
||
return ( | ||
<Box margin='170px' marginTop='20vw'> | ||
<Typography align='center' variant="h1" component="h2" fontSize="8vw" fontWeight="bold" > | ||
Tables | ||
</Typography> | ||
<Grid2 container spacing={4} justifyContent="center" marginTop="60px"> | ||
{Array.from(Array(9)).map((_, index) => ( | ||
<Grid2 key={index} size='auto' > | ||
<TableSquare tableNumber={index} totalPeople={totalPeople} setTotalPeople={setTotalPeople}></TableSquare> | ||
</Grid2> | ||
))} | ||
</Grid2> | ||
<Box textAlign='center' marginTop="60px"> | ||
{ totalPeople>0 ? | ||
<Button | ||
onClick={validateTables} | ||
variant="contained" | ||
color="success" | ||
style={{ | ||
padding: '20px 50px', // Plus grand bouton | ||
borderRadius: '50px', // Coins arrondis | ||
fontSize: '4vw', // Texte plus grand | ||
}} | ||
> | ||
Validate | ||
</Button> | ||
: null | ||
} | ||
</Box> | ||
</Box> | ||
); | ||
return ( | ||
<Box width={"100%"} height={"100vh"} display={"flex"} alignItems={"center"} flexDirection={"column"} justifyContent={"center"}> | ||
<Typography align='center' variant="h1" component="h2" fontSize="10vh" fontWeight="bold"> | ||
Tables | ||
</Typography> | ||
<Grid container spacing={4} justifyContent={"center"} alignItems={"center"} marginTop="60px" maxHeight='60vh' overflow='auto' maxWidth={800} > | ||
{Array.from(Array(15)).map((_, index) => ( | ||
<Grid key={index} > | ||
<TableSquare tableNumber={index} totalPeople={totalPeople} setTotalPeople={setTotalPeople}></TableSquare> | ||
</Grid> | ||
))} | ||
</Grid> | ||
<Box textAlign='center' marginTop="60px"> | ||
<Button | ||
onClick={validateTables} | ||
variant="contained" | ||
color="success" | ||
> | ||
<Typography variant={"h4"}>Create</Typography> | ||
</Button> | ||
</Box> | ||
</Box> | ||
); | ||
} | ||
export default LandingPage; | ||
|
||
export default LandingPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.