feat: add weekly trends

This commit is contained in:
Carl-Gerhard Lindesvärd
2026-02-18 10:44:19 +01:00
parent b81a2e0de6
commit 03c18b37ec
3 changed files with 266 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import { createFileRoute } from '@tanstack/react-router';
import { LazyComponent } from '@/components/lazy-component';
import {
OverviewFilterButton,
@@ -15,8 +16,8 @@ import OverviewTopGeo from '@/components/overview/overview-top-geo';
import OverviewTopPages from '@/components/overview/overview-top-pages';
import OverviewTopSources from '@/components/overview/overview-top-sources';
import OverviewUserJourney from '@/components/overview/overview-user-journey';
import { PAGE_TITLES, createProjectTitle } from '@/utils/title';
import { createFileRoute } from '@tanstack/react-router';
import OverviewWeeklyTrends from '@/components/overview/overview-weekly-trends';
import { createProjectTitle, PAGE_TITLES } from '@/utils/title';
export const Route = createFileRoute('/_app/$organizationId/$projectId/')({
component: ProjectDashboard,
@@ -59,6 +60,9 @@ function ProjectDashboard() {
<OverviewTopDevices projectId={projectId} />
<OverviewTopEvents projectId={projectId} />
<OverviewTopGeo projectId={projectId} />
<LazyComponent className="col-span-6">
<OverviewWeeklyTrends projectId={projectId} />
</LazyComponent>
<LazyComponent className="col-span-6">
<OverviewUserJourney projectId={projectId} />
</LazyComponent>

View File

@@ -13,6 +13,7 @@ import OverviewTopGeo from '@/components/overview/overview-top-geo';
import OverviewTopPages from '@/components/overview/overview-top-pages';
import OverviewTopSources from '@/components/overview/overview-top-sources';
import OverviewUserJourney from '@/components/overview/overview-user-journey';
import OverviewWeeklyTrends from '@/components/overview/overview-weekly-trends';
import { useTRPC } from '@/integrations/trpc/react';
import { useSuspenseQuery } from '@tanstack/react-query';
import { createFileRoute, notFound, useSearch } from '@tanstack/react-router';
@@ -125,6 +126,9 @@ function RouteComponent() {
<OverviewTopDevices projectId={projectId} shareId={shareId} />
<OverviewTopEvents projectId={projectId} shareId={shareId} />
<OverviewTopGeo projectId={projectId} shareId={shareId} />
<LazyComponent className="col-span-6">
<OverviewWeeklyTrends projectId={projectId} shareId={shareId} />
</LazyComponent>
<LazyComponent className="col-span-6">
<OverviewUserJourney projectId={projectId} shareId={shareId} />
</LazyComponent>