generated from Arquisoft/dede_0
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #198 from Arquisoft/develop
Versión despliegue 1.1.1
- Loading branch information
Showing
34 changed files
with
1,150 additions
and
222 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 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 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 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,19 +1,14 @@ | ||
|
||
//import { useQuery } from 'react-query'; | ||
import Box from '@mui/material/Box'; | ||
//import Link from '@mui/material/Link'; | ||
import Grid from '@mui/material/Grid'; | ||
|
||
import logo from './images/interfaz/logoRock.png'; | ||
import Title from './components/titleUtil'; | ||
|
||
|
||
import { createTheme, Drawer, List } from '@mui/material'; | ||
import { Drawer } from '@mui/material'; | ||
import { useState, useEffect } from 'react'; | ||
import Welcome from './components/Welcome'; | ||
import {getRocas} from './api/api'; | ||
import './css/App.css'; | ||
import { Route, Routes, Navigate, BrowserRouter as Router, BrowserRouter } from "react-router-dom"; | ||
import { Route, Routes, Navigate, BrowserRouter } from "react-router-dom"; | ||
import {Rock} from './shared/shareddtypes'; | ||
import Catalog from './components/Catalog'; | ||
import { ThemeProvider } from '@emotion/react'; | ||
|
@@ -25,9 +20,6 @@ import { Container } from "@mui/material"; | |
|
||
import "./css/App.css" | ||
import ShoppingCart from "./components/ShoppingCart"; | ||
import PaymentPage from "./components/payment/PaymentPage"; | ||
import { ContentCopy } from "@mui/icons-material"; | ||
import PaymentSummary from './components/payment/PaymentSummary'; | ||
import PaymentProcess from './components/payment/PaymentPage'; | ||
import OrderHistory from './components/Orders'; | ||
|
||
|
@@ -36,12 +28,6 @@ type Props = { | |
}; | ||
|
||
function App(): JSX.Element { | ||
const [rocks, setRocks] = useState<Rock[]>([]); | ||
|
||
const refreshRockList = async () => { | ||
setRocks(await getRocas()); | ||
}; | ||
|
||
// Shopping cart | ||
const [isNewCart, setNewCart] = useState(false); | ||
const [isCartOpen, setCartOpen] = useState(false); | ||
|
@@ -98,20 +84,17 @@ function App(): JSX.Element { | |
); | ||
}; | ||
|
||
useEffect(() => { | ||
refreshRockList(); | ||
}, []); | ||
return ( | ||
<ThemeProvider theme={theme}> | ||
<Container maxWidth="xl" className="principal"> | ||
<NavBar openCart={() => setCartOpen(true)} /> | ||
<BrowserRouter> | ||
<Routes> | ||
<Route path="/home" element={<Welcome handleAddToCart={handleAddToCart} />} /> | ||
<Route path="/home" element={<Welcome handleAddToCart={handleAddToCart} />} /> | ||
<Route path="/" element={<Navigate replace to="/home" />} /> | ||
<Route path="/catalog" element={ <Catalog rocks={rocks} handleAddToCart={handleAddToCart} /> } /> | ||
<Route path="/catalog" element={ <Catalog handleAddToCart={handleAddToCart} /> } /> | ||
<Route path="/orders" element={ <OrderHistory email={"[email protected]"}/> } /> | ||
<Route path="/payment" element={ <PaymentProcess cartContent={cartContent} setNewCart={setNewCart} /> } /> | ||
<Route path="/payment" element={ <PaymentProcess cartContent={cartContent} setNewCart={setNewCart} /> } /> | ||
<Route path="/login" element={<LogIn />} /> | ||
<Route path="/register" element={<Register />} /> | ||
<Route path="/logout" element ={<Welcome handleAddToCart={handleAddToCart} />}/> | ||
|
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.