|
1 | | -import { ThemeProvider, CssBaseline, Box, Typography } from '@mui/material'; |
| 1 | +import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'; |
| 2 | +import { ThemeProvider, CssBaseline, Box, Typography, Container } from '@mui/material'; |
2 | 3 | import theme from './theme'; |
| 4 | +import { CartProvider } from './context/CartContext'; |
| 5 | +import Navbar from './components/Navbar'; |
| 6 | +import Footer from './components/Footer'; |
| 7 | +import RecipesPage from './pages/RecipesPage'; |
| 8 | +import StorePage from './pages/StorePage'; |
| 9 | + |
| 10 | +function Home() { |
| 11 | + return ( |
| 12 | + <Box sx={{ py: { xs: 8, md: 12 }, textAlign: 'center' }}> |
| 13 | + <Container maxWidth="md"> |
| 14 | + <Typography variant="h2" component="h1" gutterBottom sx={{ fontFamily: '"Playfair Display", serif', fontWeight: 700 }}> |
| 15 | + Welcome to Jenna's Kitchen |
| 16 | + </Typography> |
| 17 | + <Typography variant="h5" color="text.secondary" sx={{ mb: 6 }}> |
| 18 | + Discover amazing AI-generated recipes and high-quality kitchen supplies. |
| 19 | + </Typography> |
| 20 | + <Box |
| 21 | + component="img" |
| 22 | + src="/Images/JennaRecipe.jpeg" |
| 23 | + alt="Jenna" |
| 24 | + sx={{ |
| 25 | + width: '100%', |
| 26 | + maxWidth: 400, |
| 27 | + borderRadius: '50%', |
| 28 | + boxShadow: '0 20px 40px rgba(0,0,0,0.1)' |
| 29 | + }} |
| 30 | + /> |
| 31 | + </Container> |
| 32 | + </Box> |
| 33 | + ); |
| 34 | +} |
3 | 35 |
|
4 | 36 | export default function App() { |
5 | 37 | return ( |
6 | 38 | <ThemeProvider theme={theme}> |
7 | 39 | <CssBaseline /> |
8 | | - <Box sx={{ display: 'flex', flexDirection: 'column', minHeight: '100vh', justifyContent: 'center', alignItems: 'center' }}> |
9 | | - <Typography variant="h4" component="h1" gutterBottom> |
10 | | - Jenna's Kitchen Mock Client |
11 | | - </Typography> |
12 | | - <Typography variant="body1"> |
13 | | - Initial Setup - Components will be added via PRs |
14 | | - </Typography> |
15 | | - </Box> |
| 40 | + <CartProvider> |
| 41 | + <BrowserRouter> |
| 42 | + <Box sx={{ display: 'flex', flexDirection: 'column', minHeight: '100vh' }}> |
| 43 | + <Navbar /> |
| 44 | + <Box component="main" sx={{ flexGrow: 1 }}> |
| 45 | + <Routes> |
| 46 | + <Route path="/" element={<Home />} /> |
| 47 | + <Route path="/recipes" element={<RecipesPage />} /> |
| 48 | + <Route path="/store" element={<StorePage />} /> |
| 49 | + <Route path="*" element={<Navigate to="/" replace />} /> |
| 50 | + </Routes> |
| 51 | + </Box> |
| 52 | + <Footer /> |
| 53 | + </Box> |
| 54 | + </BrowserRouter> |
| 55 | + </CartProvider> |
16 | 56 | </ThemeProvider> |
17 | 57 | ); |
18 | 58 | } |
0 commit comments