diff options
Diffstat (limited to 'src/Card.js')
-rw-r--r-- | src/Card.js | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/Card.js b/src/Card.js index 5710881..626cec0 100644 --- a/src/Card.js +++ b/src/Card.js @@ -1,4 +1,5 @@ import React from "react"; +import { Link } from "react-router-dom"; import "./Card.css"; const Card = (props) => { @@ -8,17 +9,19 @@ const Card = (props) => { } return ( <div className="Card bg-white rounded-lg border-2 border-orange-300 p-4 m-4"> - <p> - <span className="text-2xl"> - {props.latest} - {props.suffix}{" "} - </span> - <span className="Diff text-gray-600 text-sm"> - ({diff} - {props.suffix}) - </span> - </p> - <h3 className="text-base">{props.name}</h3> + <Link to={props.link}> + <p> + <span className="text-2xl"> + {props.latest} + {props.suffix}{" "} + </span> + <span className="Diff text-gray-600 text-sm"> + ({diff} + {props.suffix}) + </span> + </p> + <h3 className="text-base">{props.name}</h3> + </Link> </div> ); }; |