Skip to content

Commit

Permalink
Merge pull request #203 from Arquisoft/DesarrolloCategoriesBar
Browse files Browse the repository at this point in the history
Cosas de categorias y demás
  • Loading branch information
uo276514 authored May 1, 2022
2 parents a232538 + 22da5c9 commit 0a855eb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
4 changes: 2 additions & 2 deletions webapp/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const App = () => {
<Route path="" element={
<Wrapper>
<Navbar />
<CategoriesBar/>

<Home />
<Footer />
</Wrapper>
Expand All @@ -191,7 +191,7 @@ const App = () => {
<Wrapper>
<div className='content-wrap'>
<Navbar />

<CategoriesBar/>
{
localStorage.getItem("isAdmin")=="true" ? // isAdmin ?
<></>
Expand Down
21 changes: 15 additions & 6 deletions webapp/src/PayForm/CategoriesBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,30 @@ const NavigationWrapper = styled.nav`
justify-content: space-between;
`

const Separator = styled.hr`
height: 10%;
const StyledLink = styled.a`
color: #ffffff;
`

const Separator = styled.div`
height: 5px;
width: 70%;
border-radius: 14px;
margin: 0 auto;
background-color: #d1626f;
align-content: center;
margin: 5px auto;
background-color: #d3707c;
`


const CategoriesBar = ()=> {
return(
<>
<NavigationWrapper>
<Link className="linkCategorie" href="/juguete/categoria/nostalgia">Nostalgia</Link>
<Link className="linkCategorie" href="/productos">Productos</Link>
<StyledLink className="linkCategorie" href="/juguete/categoria/nostalgia">Nostalgia</StyledLink>
<StyledLink className="linkCategorie" href="/juguete/categoria/nostalgia">Vehiculos</StyledLink>
<StyledLink className="linkCategorie" href="/juguete/categoria/nostalgia">Aire libre</StyledLink>
<StyledLink className="linkCategorie" href="/juguete/categoria/nostalgia">Algo</StyledLink>
<StyledLink className="linkCategorie" href="/juguete/categoria/nostalgia">Otros</StyledLink>
<StyledLink className="linkCategorie" href="/productos">Productos</StyledLink>
</NavigationWrapper>
<Separator/>
</>
Expand Down
11 changes: 1 addition & 10 deletions webapp/src/PayForm/ProcesoPago.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ let condPedido= true;
let gastosEnvio:any;

//Procesar pedido

async function finalizarPedido(precioGastosDeEnvio : string,juguetes: Juguete[], email:string): Promise<any> {


let p:number = parseFloat(precioGastosDeEnvio);
const calculateTotal = (items:Juguete[]) =>
items.reduce((ack:number, item) => ack + item.cantidad*item.precio,0);
Expand Down Expand Up @@ -98,13 +97,7 @@ const ProcesoPago:React.FC<Props> = ({cartItems}) => {
toast.warn("Por favor, inicie sesión con su POD para que podamos obtener su dirección", {position: toast.POSITION.TOP_CENTER})
} else {
let variable = await getGastosEnvio();
console.log(gastosEnvio);
if(gastosEnvio==0.00) {
toast.error("Su dirección no fue encontrada, lo sentimos. Para solucionar el problema "+
"modifique la dirección de su POD", {position: toast.POSITION.TOP_CENTER})
} else {
setPasoActual((pasoPrevio) => pasoPrevio + 1);
}
}
};

Expand Down Expand Up @@ -170,8 +163,6 @@ const ProcesoPago:React.FC<Props> = ({cartItems}) => {
}
};



return (
<React.Fragment>
<Stepper
Expand Down
3 changes: 3 additions & 0 deletions webapp/src/PayForm/categories.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
padding:16px;
border-radius: 32px;
}
.linkCategorie:hover {
color:rgb(255, 255, 255);
}

0 comments on commit 0a855eb

Please sign in to comment.