import React from "react"; import { useRouter } from "next/router"; import useSWR from "swr"; // lib import { requiredAuth } from "lib/auth"; // layouts import AppLayout from "layouts/app-layout"; // services import userService from "services/user.service"; // hooks import useIssues from "hooks/use-issues"; // components import { CompletedIssuesGraph, IssuesList, IssuesPieChart, IssuesStats, } from "components/workspace"; // types import type { NextPage, GetServerSidePropsContext } from "next"; // fetch-keys import { USER_WORKSPACE_DASHBOARD } from "constants/fetch-keys"; const WorkspacePage: NextPage = () => { const router = useRouter(); const { workspaceSlug } = router.query; const { myIssues } = useIssues(workspaceSlug as string); const { data: workspaceDashboardData } = useSWR( workspaceSlug ? USER_WORKSPACE_DASHBOARD(workspaceSlug as string) : null, workspaceSlug ? () => userService.userWorkspaceDashboard(workspaceSlug as string) : null ); hi = "hi"; return (

Plane is a open source application, to support us you can star us on GitHub!

{/* View roadmap */} Star us on GitHub
); }; export const getServerSideProps = async (ctx: GetServerSidePropsContext) => { const user = await requiredAuth(ctx.req?.headers.cookie); const redirectAfterSignIn = ctx.resolvedUrl; if (!user) { return { redirect: { destination: `/signin?next=${redirectAfterSignIn}`, permanent: false, }, }; } return { props: { user, }, }; }; export default WorkspacePage;