Skip to content

Commit

Permalink
Se agrega history.push a la card en versión mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoCoronel committed Sep 24, 2021
1 parent 12e74eb commit 34a5dc7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/CardMainMobile/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import React from 'react';
import './style.scss';
import { useHistory } from 'react-router';
import {card} from './data';
import image from '../../assets/imagen-vindano-1.png';
import Button from "../Button";

function CardMainMobile() {

const history = useHistory();

const handleClick = () => {
history.push("/home")
}

return (
<div className = "card-container">
<div className = "card-container__main">
Expand All @@ -30,7 +38,7 @@ function CardMainMobile() {
</div>
)}
</div>
<Button variant="secondary" text="Volver" clases='card-container__button'></Button>
<Button variant="secondary" text="Volver" clases='card-container__button' onClick={handleClick}></Button>
</div>
);
}
Expand Down

0 comments on commit 34a5dc7

Please sign in to comment.