"use client"; import { FC } from "react"; import { Grid, Box, Dialog } from "@mui/material"; import { useRouter } from "next/navigation"; import { typography } from "@/app/_styles/theme"; interface DetailProps { title: string; entity: string; children: any; } export const Detail: FC = ({ title, entity, children }) => { const router = useRouter(); const { h3 } = typography; return ( router.push(`/${entity}`)} fullScreen sx={{ backgroundColor: "#ddd" }} > {title} {children} ); };