App directory refactoring
This commit is contained in:
parent
a53a26f4c0
commit
b312a8c862
153 changed files with 1532 additions and 1447 deletions
|
|
@ -1,32 +0,0 @@
|
|||
import Head from "next/head";
|
||||
import useSWR from "swr";
|
||||
import { NextPage } from "next";
|
||||
import { Layout } from "components/Layout";
|
||||
import { TicketList } from "components/TicketList";
|
||||
import { getTicketsByOverviewQuery } from "graphql/getTicketsByOverviewQuery";
|
||||
|
||||
const Assigned: NextPage = () => {
|
||||
const { data: ticketData, error: ticketError }: any = useSWR(
|
||||
{
|
||||
document: getTicketsByOverviewQuery,
|
||||
variables: { overviewId: "gid://zammad/Overview/1" },
|
||||
},
|
||||
{ refreshInterval: 10000 }
|
||||
);
|
||||
|
||||
const shouldRender = !ticketError && ticketData;
|
||||
const tickets =
|
||||
ticketData?.ticketsByOverview?.edges.map((edge: any) => edge.node) || [];
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<Head>
|
||||
<title>Link Shell – Assigned Tickets</title>
|
||||
</Head>
|
||||
{shouldRender && <TicketList title="Assigned" tickets={tickets} />}
|
||||
{ticketError && <div>{ticketError.toString()}</div>}
|
||||
</Layout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Assigned;
|
||||
Loading…
Add table
Add a link
Reference in a new issue