worked on making cards fully clickable

This commit is contained in:
Anish Roy
2023-01-18 18:16:43 +00:00
parent d55846e117
commit 3b715d3ab8

View File

@@ -1,4 +1,4 @@
import { Link } from "react-router-dom";
import { Link, useNavigate } from "react-router-dom";
import {
Card,
@@ -25,6 +25,7 @@ export default function TableCard({
link,
actions,
}: ITableCardProps) {
const navigate = useNavigate();
return (
<Card style={{ height: "100%", display: "flex", flexDirection: "column" }}>
<CardActionArea component={Link} to={link}>
@@ -46,7 +47,11 @@ export default function TableCard({
backgroundColor: "action.input",
borderRadius: 1,
overflow: "hidden",
"&:hover": {
cursor: "pointer",
},
}}
onClick={() => navigate(link)}
>
<Box
sx={{