type PageProps = {
params: {
id: string;
};
};
export default function Page({ params: { id } }: PageProps) {
return
Page
;
}
/*
import { GetServerSideProps, GetServerSidePropsContext } from "next";
import Head from "next/head";
import useSWR from "swr";
import { NextPage } from "next";
import { Grid } from "@mui/material";
import { TicketDetail } from "@/app/_components/TicketDetail";
import { TicketEdit } from "@/app/_components/TicketEdit";
import { getTicketQuery } from "@/app/_graphql/getTicketQuery";
type TicketProps = {
id: string;
};
const Ticket: NextPage = ({ id }) => {
const { data: ticketData, error: ticketError }: any = useSWR(
{
document: getTicketQuery,
variables: { ticketId: `gid://zammad/Ticket/${id}` },
},
{ refreshInterval: 100000 }
);
const shouldRender = !ticketError && ticketData;
return (
<>
{shouldRender && (
)}
{ticketError && {ticketError.toString()}
}
>
);
};
export const getServerSideProps: GetServerSideProps = async (
context: GetServerSidePropsContext
) => {
const { id } = context.query;
return { props: { id } };
};
export default Ticket;
*/