"use client"; import { FC } from "react"; import { useRouter } from "next/navigation"; import { Box, Grid } from "@mui/material"; import { DataGridPro } from "@mui/x-data-grid-pro"; import { useTranslate } from "react-polyglot"; interface RawDataViewerProps { rows: any[]; height: number; } export const RawDataViewer: FC = ({ rows, height }) => { const t = useTranslate(); const router = useRouter(); const columns = [ { field: "open_date", headerName: "Open Date", //t("date"), editable: false, flex: 0.7, valueFormatter: ({ value }: any) => new Date(value).toLocaleDateString(), }, { field: "close_date", headerName: "Close Date", // t("date"), editable: false, flex: 0.7, valueFormatter: ({ value }: any) => new Date(value).toLocaleDateString(), }, { field: "incident", headerName: t("incident"), editable: false, flex: 1, }, { field: "technology", headerName: t("technology"), editable: false, flex: 0.8, }, { field: "targeted_group", headerName: t("targetedGroup"), editable: false, flex: 1.3, }, { field: "country", headerName: t("country"), editable: false, flex: 1, }, { field: "region", headerName: t("subregion"), editable: false, flex: 1, }, { field: "continent", headerName: t("continent"), editable: false, flex: 1, }, ]; return ( e.stopPropagation()} > router.push("/tickets/" + e.row.id)} /> ); };