diff --git a/app/root.tsx b/app/root.tsx index e163251..b8aab45 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -285,11 +285,11 @@ function Layout({ children }: React.PropsWithChildren<{}>) { /> - + } variant="light" @@ -307,18 +307,6 @@ function Layout({ children }: React.PropsWithChildren<{}>) { variant="light" active={location.pathname.includes('/importexport')} /> - - - - } - variant="light" - active={location.pathname.includes('/statistics')} - /> )} {user && ( diff --git a/app/routes/report.tsx b/app/routes/reports.tsx similarity index 89% rename from app/routes/report.tsx rename to app/routes/reports.tsx index 739acef..119b24a 100644 --- a/app/routes/report.tsx +++ b/app/routes/reports.tsx @@ -6,9 +6,9 @@ import { requireUserId } from '~/session.server'; export const meta: MetaFunction = () => { return { - title: 'Report | WorkTimer', + title: 'Reports | WorkTimer', description: - 'Generate a report of your time entries. You must be logged in to do this.' + 'Generate reports of your time entries. You must be logged in to do this.' }; }; @@ -41,7 +41,7 @@ export default function ReportPage() { border: 0 }} > - Report + Reports Coming soon diff --git a/app/routes/statistics.tsx b/app/routes/statistics.tsx deleted file mode 100644 index 4121e2d..0000000 --- a/app/routes/statistics.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Box, Paper } from '@mantine/core'; -import { MetaFunction, LoaderArgs, redirect, json } from '@remix-run/node'; -import { useLoaderData } from '@remix-run/react'; -import { getTimeEntries } from '~/models/timeEntry.server'; -import { requireUserId } from '~/session.server'; - -export const meta: MetaFunction = () => { - return { - title: 'Statistics | WorkTimer', - description: - 'See statistics about your time entries. You must be logged in to do this.' - }; -}; - -export async function loader({ request }: LoaderArgs) { - const userId = await requireUserId(request); - if (!userId) return redirect('/login'); - - return json({ - ...(await getTimeEntries({ - userId - })) - }); -} - -export default function ReportPage() { - const data = useLoaderData(); - - return ( - <> -

Statistics

- - Coming soon - - - ); -}