diff --git a/src/components/CardContact.jsx b/src/components/CardContact.jsx new file mode 100644 index 000000000..288eac7f5 --- /dev/null +++ b/src/components/CardContact.jsx @@ -0,0 +1,31 @@ +import React from "react"; +import { useNavigate } from "react-router-dom"; + + +function CardContact(props) { + + const navigate = useNavigate() + + return ( + + <> +
+ Contact + +
+
{props.contactName}
+
+ +
+ navigate(`/ViewContacts/${props.contactId}`)}> View Contact + Another link +
+
+ + ) +} +export default CardContact; \ No newline at end of file diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 30d43a263..3bd123556 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -1,19 +1,37 @@ +import React from "react"; +import { useNavigate } from "react-router-dom"; import { Link } from "react-router-dom"; -export const Navbar = () => { +function Navbar() { + const navigate = useNavigate(); + + const goHome =() => { + navigate('/'); + }; + const goBack = () => { + navigate(-1); + }; + return ( -