Skip to content

Commit 8295355

Browse files
committed
fix: assistant page
1 parent 1416c61 commit 8295355

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

apps/dashboard/app/(main)/websites/[id]/assistant/components/loading-message.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
'use client';
22

3-
import { Robot } from '@phosphor-icons/react';
3+
import { RobotIcon } from '@phosphor-icons/react';
44

55
export function LoadingMessage() {
66
return (
77
<div className="flex max-w-[85%] gap-3">
88
<div className="mt-1 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-muted">
9-
<Robot className="h-4 w-4" />
9+
<RobotIcon className="h-4 w-4" />
1010
</div>
1111
<div className="mr-2 rounded-lg bg-muted px-4 py-3">
1212
<div className="flex items-center gap-2 text-sm">

apps/dashboard/app/(main)/websites/[id]/assistant/components/visualization-section.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
CompassIcon,
88
DotsThreeOutlineVerticalIcon,
99
FunnelIcon,
10+
TrendUpIcon,
1011
} from '@phosphor-icons/react';
1112
import type { ColumnDef } from '@tanstack/react-table';
1213
import { useAtom } from 'jotai';
@@ -818,7 +819,7 @@ export default function VisualizationSection() {
818819
<div
819820
className={`flex h-8 w-8 flex-shrink-0 items-center justify-center rounded transition-all duration-300 ${websiteData ? 'bg-primary/10' : 'bg-muted/20'}`}
820821
>
821-
<TrendUp
822+
<TrendUpIcon
822823
className={`h-4 w-4 transition-all duration-300 ${websiteData ? 'text-primary' : 'text-muted-foreground/60'}`}
823824
/>
824825
</div>

apps/dashboard/app/(main)/websites/[id]/assistant/page.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { useAtom } from 'jotai';
44
import dynamic from 'next/dynamic';
55
import { useParams } from 'next/navigation';
6-
import React, { Suspense, useEffect } from 'react';
6+
import { useEffect } from 'react';
77
import { Skeleton } from '@/components/ui/skeleton';
88
import { useWebsite } from '@/hooks/use-websites';
99
import {
@@ -61,10 +61,13 @@ export default function AssistantPage() {
6161
const [, setWebsiteData] = useAtom(websiteDataAtom);
6262
const [, setDateRange] = useAtom(dateRangeAtom);
6363

64-
// Combine atom initialization
65-
React.useEffect(() => {
66-
if (id) setWebsiteId(id as string);
67-
if (websiteData) setWebsiteData(websiteData);
64+
useEffect(() => {
65+
if (id) {
66+
setWebsiteId(id as string);
67+
}
68+
if (websiteData) {
69+
setWebsiteData(websiteData);
70+
}
6871
setDateRange({
6972
start_date: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString(),
7073
end_date: new Date().toISOString(),

0 commit comments

Comments
 (0)