Skip to content

Commit ce1eda9

Browse files
committed
fix: help dialog
1 parent 3b354ad commit ce1eda9

File tree

4 files changed

+66
-498
lines changed

4 files changed

+66
-498
lines changed

apps/dashboard/app/(main)/websites/[id]/_components/tabs/overview-tab.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,19 +497,20 @@ export function WebsiteOverviewTab({
497497
date: formatDateByGranularity(event.date, dateRange.granularity),
498498
};
499499
if (visibleMetrics.pageviews) {
500-
filtered.pageviews = event.pageviews;
500+
filtered.pageviews = event.pageviews as number;
501501
}
502502
if (visibleMetrics.visitors) {
503-
filtered.visitors = event.visitors || event.unique_visitors || 0;
503+
filtered.visitors =
504+
(event.visitors as number) || (event.unique_visitors as number) || 0;
504505
}
505506
if (visibleMetrics.sessions) {
506-
filtered.sessions = event.sessions;
507+
filtered.sessions = event.sessions as number;
507508
}
508509
if (visibleMetrics.bounce_rate) {
509-
filtered.bounce_rate = event.bounce_rate;
510+
filtered.bounce_rate = event.bounce_rate as number;
510511
}
511512
if (visibleMetrics.avg_session_duration) {
512-
filtered.avg_session_duration = event.avg_session_duration;
513+
filtered.avg_session_duration = event.avg_session_duration as number;
513514
}
514515
return filtered;
515516
});

apps/dashboard/app/(main)/websites/[id]/sessions/_components/session-row.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
SparkleIcon,
1010
WarningIcon,
1111
} from '@phosphor-icons/react';
12-
import dynamic from 'next/dynamic';
12+
import lazy from 'next/dynamic';
1313
import React, { useCallback } from 'react';
1414
import { FaviconImage } from '@/components/analytics/favicon-image';
1515
import { Badge } from '@/components/ui/badge';
@@ -19,7 +19,7 @@ import {
1919
CollapsibleTrigger,
2020
} from '@/components/ui/collapsible';
2121

22-
const SessionEventTimeline = dynamic(
22+
const SessionEventTimeline = lazy(
2323
() =>
2424
import('./session-event-timeline').then((mod) => ({
2525
default: mod.SessionEventTimeline,

apps/dashboard/components/layout/help-dialog.tsx

Lines changed: 58 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
ChatCircleIcon,
44
LaptopIcon,
55
} from '@phosphor-icons/react';
6+
import Link from 'next/link';
67
import { Button } from '@/components/ui/button';
78
import {
89
Dialog,
@@ -28,60 +29,66 @@ export function HelpDialog({ open, onOpenChange }: HelpDialogProps) {
2829
</DialogDescription>
2930
</DialogHeader>
3031
<div className="grid gap-3 py-4">
31-
<Button
32-
className="h-auto justify-start py-3 text-left"
33-
variant="outline"
34-
>
35-
<div className="flex items-start gap-3">
36-
<BookOpenIcon
37-
className="mt-0.5 h-5 w-5 flex-shrink-0 text-primary"
38-
size={32}
39-
weight="duotone"
40-
/>
41-
<div>
42-
<h4 className="font-medium text-sm">Documentation</h4>
43-
<span className="mt-1 block text-muted-foreground text-xs">
44-
Read guides and API references
45-
</span>
32+
<Link href="https://databuddy.com/docs" target="_blank">
33+
<Button
34+
className="h-auto justify-start py-3 text-left"
35+
variant="outline"
36+
>
37+
<div className="flex items-start gap-3">
38+
<BookOpenIcon
39+
className="mt-0.5 h-5 w-5 flex-shrink-0 text-primary"
40+
size={32}
41+
weight="duotone"
42+
/>
43+
<div>
44+
<h4 className="font-medium text-sm">Documentation</h4>
45+
<span className="mt-1 block text-muted-foreground text-xs">
46+
Read guides and API references
47+
</span>
48+
</div>
4649
</div>
47-
</div>
48-
</Button>
49-
<Button
50-
className="h-auto justify-start py-3 text-left"
51-
variant="outline"
52-
>
53-
<div className="flex items-start gap-3">
54-
<ChatCircleIcon
55-
className="mt-0.5 h-5 w-5 flex-shrink-0 text-primary"
56-
size={32}
57-
weight="duotone"
58-
/>
59-
<div>
60-
<h4 className="font-medium text-sm">Contact Support</h4>
61-
<span className="mt-1 block text-muted-foreground text-xs">
62-
Get help from our support team
63-
</span>
50+
</Button>
51+
</Link>
52+
<Link href="mailto:[email protected]" target="_blank">
53+
<Button
54+
className="h-auto justify-start py-3 text-left"
55+
variant="outline"
56+
>
57+
<div className="flex items-start gap-3">
58+
<ChatCircleIcon
59+
className="mt-0.5 h-5 w-5 flex-shrink-0 text-primary"
60+
size={32}
61+
weight="duotone"
62+
/>
63+
<div>
64+
<h4 className="font-medium text-sm">Contact Support</h4>
65+
<span className="mt-1 block text-muted-foreground text-xs">
66+
Get help from our support team
67+
</span>
68+
</div>
6469
</div>
65-
</div>
66-
</Button>
67-
<Button
68-
className="h-auto justify-start py-3 text-left"
69-
variant="outline"
70-
>
71-
<div className="flex items-start gap-3">
72-
<LaptopIcon
73-
className="mt-0.5 h-5 w-5 flex-shrink-0 text-primary"
74-
size={32}
75-
weight="duotone"
76-
/>
77-
<div>
78-
<h4 className="font-medium text-sm">Tutorials</h4>
79-
<span className="mt-1 block text-muted-foreground text-xs">
80-
Learn Databuddy step by step
81-
</span>
70+
</Button>
71+
</Link>
72+
<Link href="https://www.youtube.com/trydatabuddy" target="_blank">
73+
<Button
74+
className="h-auto justify-start py-3 text-left"
75+
variant="outline"
76+
>
77+
<div className="flex items-start gap-3">
78+
<LaptopIcon
79+
className="mt-0.5 h-5 w-5 flex-shrink-0 text-primary"
80+
size={32}
81+
weight="duotone"
82+
/>
83+
<div>
84+
<h4 className="font-medium text-sm">Tutorials</h4>
85+
<span className="mt-1 block text-muted-foreground text-xs">
86+
Learn Databuddy step by step
87+
</span>
88+
</div>
8289
</div>
83-
</div>
84-
</Button>
90+
</Button>
91+
</Link>
8592
</div>
8693
</DialogContent>
8794
</Dialog>

0 commit comments

Comments
 (0)