diff --git a/packages/revert-next/pages/Dashboard.tsx b/packages/revert-next/app/dashboard/(overview)/Dashboard.tsx similarity index 100% rename from packages/revert-next/pages/Dashboard.tsx rename to packages/revert-next/app/dashboard/(overview)/Dashboard.tsx diff --git a/packages/revert-next/app/dashboard/(overview)/page.tsx b/packages/revert-next/app/dashboard/(overview)/page.tsx index cbfcef232..6c928e542 100644 --- a/packages/revert-next/app/dashboard/(overview)/page.tsx +++ b/packages/revert-next/app/dashboard/(overview)/page.tsx @@ -1,6 +1,6 @@ import { currentUser } from '@clerk/nextjs/server'; import { Header } from '@revertdotdev/components'; -import Dashboard from '@revertdotdev/pages/Dashboard'; +import Dashboard from './Dashboard'; export default async function Page() { const user = await currentUser(); diff --git a/packages/revert-next/components/ui/dashboard/ApiRequestChart.tsx b/packages/revert-next/components/ui/dashboard/ApiRequestChart.tsx index f142cf291..2bb043ec4 100644 --- a/packages/revert-next/components/ui/dashboard/ApiRequestChart.tsx +++ b/packages/revert-next/components/ui/dashboard/ApiRequestChart.tsx @@ -1,12 +1,18 @@ 'use client'; +import { AnalyticsSchema } from '@revertdotdev/types/schemas/analyticsSchema'; import { AreaChart } from '@tremor/react'; const valueFormatter = function (number: number) { return new Intl.NumberFormat('us').format(number).toString(); }; -export function ApiRequestChart({ value }) { +type ApiRequestChartProps = { + value: { + summaryApiCalls: AnalyticsSchema['result']['summaryApiCalls']; + }; +}; +export function ApiRequestChart({ value }: ApiRequestChartProps) { const summaryApiCalls = value?.summaryApiCalls; return ( @@ -29,4 +35,4 @@ export function ApiRequestChart({ value }) { /> ); -} \ No newline at end of file +} diff --git a/packages/revert-next/components/ui/skeleton/dashboard/CardSkeleton.tsx b/packages/revert-next/components/ui/skeleton/dashboard/CardSkeleton.tsx index f7dff64e5..4bbca2225 100644 --- a/packages/revert-next/components/ui/skeleton/dashboard/CardSkeleton.tsx +++ b/packages/revert-next/components/ui/skeleton/dashboard/CardSkeleton.tsx @@ -1,4 +1,4 @@ -import { cn } from "@revertdotdev/utils"; +import { cn } from '@revertdotdev/utils'; //Todo: later configure shimmer const shimmer = diff --git a/packages/revert-next/components/ui/skeleton/dashboard/DashboardSkeleton.tsx b/packages/revert-next/components/ui/skeleton/dashboard/DashboardSkeleton.tsx index c438902e6..e4b2563fe 100644 --- a/packages/revert-next/components/ui/skeleton/dashboard/DashboardSkeleton.tsx +++ b/packages/revert-next/components/ui/skeleton/dashboard/DashboardSkeleton.tsx @@ -9,4 +9,4 @@ export function DashboardSkeleton() { ); -} \ No newline at end of file +} diff --git a/packages/revert-next/lib/actions.ts b/packages/revert-next/lib/actions.ts index 2e1c62c40..b59824b3d 100644 --- a/packages/revert-next/lib/actions.ts +++ b/packages/revert-next/lib/actions.ts @@ -1,5 +1,4 @@ 'use server'; - import { cookies } from 'next/headers'; import { DEFAULT_ENV } from './constants'; import { revalidatePath } from 'next/cache'; diff --git a/packages/revert-next/middleware.ts b/packages/revert-next/middleware.ts index e921b8dd8..635dd0d95 100644 --- a/packages/revert-next/middleware.ts +++ b/packages/revert-next/middleware.ts @@ -7,8 +7,3 @@ export default clerkMiddleware((auth, request) => { auth().protect(); } }); - -// Todo: configure the private routes -export const config = { - matcher: ['/((?!.*\\..*|_next).*)', '/dashboard', '/oauth-callback/clickup'], -}; diff --git a/packages/revert-next/next.config.mjs b/packages/revert-next/next.config.mjs index a3eb95dbc..0bcc118c4 100644 --- a/packages/revert-next/next.config.mjs +++ b/packages/revert-next/next.config.mjs @@ -1,5 +1,9 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + webpack: (config) => { + return config; + }, + async redirects() { return [ {