import React, { useEffect, useState } from "react"; import { useRouter } from "next/router"; import useSWR, { mutate } from "swr"; // layouts import { WorkspaceAuthorizationLayout } from "layouts/auth-layout"; // services import userService from "services/user.service"; // components import { CompletedIssuesGraph, IssuesList, IssuesPieChart, IssuesStats, } from "components/workspace"; // types import type { NextPage } from "next"; // fetch-keys import { USER_WORKSPACE_DASHBOARD } from "constants/fetch-keys"; const WorkspacePage: NextPage = () => { const [month, setMonth] = useState(new Date().getMonth() + 1); const router = useRouter(); const { workspaceSlug } = router.query; const { data: workspaceDashboardData } = useSWR( workspaceSlug ? USER_WORKSPACE_DASHBOARD(workspaceSlug as string) : null, workspaceSlug ? () => userService.userWorkspaceDashboard(workspaceSlug as string, month) : null ); useEffect(() => { if (!workspaceSlug) return; mutate(USER_WORKSPACE_DASHBOARD(workspaceSlug as string)); }, [month, workspaceSlug]); return (

Plane is open source, support us by staring us on GitHub.

{/* View roadmap */} Star us on GitHub
); }; export default WorkspacePage;