chore: move components to a correct folder
This commit is contained in:
		
							
								
								
									
										14
									
								
								src/App.jsx
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								src/App.jsx
									
									
									
									
									
								
							| @@ -1,11 +1,9 @@ | |||||||
| import { useState } from 'react' | import { useState } from 'react' | ||||||
| import Background from "./components/Background"; |  | ||||||
| import VideoBackground from "./components/VimeoEmbed"; |  | ||||||
| import AppHeader from './components/AppHeader'; | import AppHeader from './components/AppHeader'; | ||||||
| import Footer from './components/Footer'; | import Footer from './components/Footer'; | ||||||
| import Box from '@mui/material/Box'; | import Box from '@mui/material/Box'; | ||||||
|  |  | ||||||
| import Admin from './private/Admin'; | import Products from './private/products/Products'; | ||||||
|  |  | ||||||
| import './App.css' | import './App.css' | ||||||
|  |  | ||||||
| @@ -14,10 +12,6 @@ function App() { | |||||||
|  |  | ||||||
|   return ( |   return ( | ||||||
|     <> |     <> | ||||||
|  |  | ||||||
|       {/* <Background imageName='background.jpg' opacity={0.65} /> */} |  | ||||||
|       {/* <VideoBackground videoId="1066622045" /> */} |  | ||||||
|  |  | ||||||
|       <Box |       <Box | ||||||
|         sx={{ |         sx={{ | ||||||
|           display: 'flex', |           display: 'flex', | ||||||
| @@ -30,9 +24,9 @@ function App() { | |||||||
|  |  | ||||||
|         {/* Main content area */} |         {/* Main content area */} | ||||||
|         <Box component="main" sx={{ flex: 1, p: 2 }}> |         <Box component="main" sx={{ flex: 1, p: 2 }}> | ||||||
|           {zone === 'private' && <Admin />} |           {zone === 'private' && <Products />} | ||||||
|           {zone === 'restricted' && <Admin />} |           {zone === 'restricted' && <Products />} | ||||||
|           {zone === 'public' && <Admin />} |           {zone === 'public' && <Products />} | ||||||
|         </Box> |         </Box> | ||||||
|         <Footer zone={zone} /> |         <Footer zone={zone} /> | ||||||
|       </Box> |       </Box> | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| import React, { useState, useEffect } from 'react'; | import { useState, useEffect } from 'react'; | ||||||
| import { Box, Button, TextField, Grid, Avatar, Typography, Paper } from '@mui/material'; | import { Box, Button, TextField, Grid, Avatar, Typography, Paper } from '@mui/material'; | ||||||
| import { handleDecimalInputKeyDown } from '../utils/validation'; | import { handleDecimalInputKeyDown } from '../../utils/validation'; | ||||||
| 
 | 
 | ||||||
| export default function AddOrEditProductForm({ onAdd, initialData, onCancel }) { | export default function AddOrEditProductForm({ onAdd, initialData, onCancel }) { | ||||||
|   const [product, setProduct] = useState({ |   const [product, setProduct] = useState({ | ||||||
| @@ -1,16 +1,13 @@ | |||||||
| 
 | 
 | ||||||
| import SectionContainer from '../components/SectionContainer'; | import SectionContainer from '../../components/SectionContainer.jsx'; | ||||||
| import React, { useState } from 'react'; | import { useState } from 'react'; | ||||||
| import { DataGrid } from '@mui/x-data-grid'; | import { DataGrid } from '@mui/x-data-grid'; | ||||||
| import { Grid, Card, CardMedia, CardContent, Typography, Button, Dialog, DialogTitle, DialogContent, IconButton, Box, Avatar } from '@mui/material'; | import { Typography, Button, Dialog, DialogTitle, DialogContent, IconButton, Box, Avatar } from '@mui/material'; | ||||||
| import AddOrEditProductForm from './AddOrEditProductForm.jsx'; | import AddOrEditProductForm from './AddOrEditProductForm.jsx'; | ||||||
| import EditIcon from '@mui/icons-material/Edit'; |  | ||||||
| import DeleteIcon from '@mui/icons-material/Delete'; |  | ||||||
| 
 | 
 | ||||||
| import EditRoundedIcon from '@mui/icons-material/EditRounded'; | import EditRoundedIcon from '@mui/icons-material/EditRounded'; | ||||||
| import DeleteRoundedIcon from '@mui/icons-material/DeleteRounded'; | import DeleteRoundedIcon from '@mui/icons-material/DeleteRounded'; | ||||||
| 
 | import '../../App.css' | ||||||
| import '../App.css'; |  | ||||||
| 
 | 
 | ||||||
| const columnsBase = [ | const columnsBase = [ | ||||||
|     { |     { | ||||||
| @@ -41,7 +38,7 @@ const columnsBase = [ | |||||||
|     { field: 'stock', headerName: 'Stock', width: 120, type: 'number' }, |     { field: 'stock', headerName: 'Stock', width: 120, type: 'number' }, | ||||||
| ]; | ]; | ||||||
| 
 | 
 | ||||||
| export default function Admin({ children, maxWidth = 'lg', sx = {} }) { | export default function Products({ children, maxWidth = 'lg', sx = {} }) { | ||||||
|     const [rows, setRows] = useState([ |     const [rows, setRows] = useState([ | ||||||
|         { id: 1, company: 'Fendi casa', name: 'Product 1', price: 10.99, provider: 'Provider A', stock: 100, category: 'Home', representation: '/1.jpg' }, |         { id: 1, company: 'Fendi casa', name: 'Product 1', price: 10.99, provider: 'Provider A', stock: 100, category: 'Home', representation: '/1.jpg' }, | ||||||
|         { id: 2, company: 'Fendi casa', name: 'Product 2', price: 20.0, provider: 'Provider B', stock: 50, category: 'Home', representation: '/2.jpg' }, |         { id: 2, company: 'Fendi casa', name: 'Product 2', price: 20.0, provider: 'Provider B', stock: 50, category: 'Home', representation: '/2.jpg' }, | ||||||
		Reference in New Issue
	
	Block a user
	 Rodolfo Ruiz
					Rodolfo Ruiz