chore: move components to a correct folder

This commit is contained in:
Rodolfo Ruiz
2025-06-11 16:42:05 -06:00
parent 2078715a34
commit c436e08b10
3 changed files with 11 additions and 20 deletions

View File

@@ -1,11 +1,9 @@
import { useState } from 'react'
import Background from "./components/Background";
import VideoBackground from "./components/VimeoEmbed";
import AppHeader from './components/AppHeader';
import Footer from './components/Footer';
import Box from '@mui/material/Box';
import Admin from './private/Admin';
import Products from './private/products/Products';
import './App.css'
@@ -14,10 +12,6 @@ function App() {
return (
<>
{/* <Background imageName='background.jpg' opacity={0.65} /> */}
{/* <VideoBackground videoId="1066622045" /> */}
<Box
sx={{
display: 'flex',
@@ -30,9 +24,9 @@ function App() {
{/* Main content area */}
<Box component="main" sx={{ flex: 1, p: 2 }}>
{zone === 'private' && <Admin />}
{zone === 'restricted' && <Admin />}
{zone === 'public' && <Admin />}
{zone === 'private' && <Products />}
{zone === 'restricted' && <Products />}
{zone === 'public' && <Products />}
</Box>
<Footer zone={zone} />
</Box>

View File

@@ -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 { handleDecimalInputKeyDown } from '../utils/validation';
import { handleDecimalInputKeyDown } from '../../utils/validation';
export default function AddOrEditProductForm({ onAdd, initialData, onCancel }) {
const [product, setProduct] = useState({

View File

@@ -1,16 +1,13 @@
import SectionContainer from '../components/SectionContainer';
import React, { useState } from 'react';
import SectionContainer from '../../components/SectionContainer.jsx';
import { useState } from 'react';
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 EditIcon from '@mui/icons-material/Edit';
import DeleteIcon from '@mui/icons-material/Delete';
import EditRoundedIcon from '@mui/icons-material/EditRounded';
import DeleteRoundedIcon from '@mui/icons-material/DeleteRounded';
import '../App.css';
import '../../App.css'
const columnsBase = [
{
@@ -41,7 +38,7 @@ const columnsBase = [
{ 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([
{ 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' },