Skip to content

Commit 89d0a13

Browse files
refactor(dashboard): remove unused imports and optimize page components
1 parent 233f7cf commit 89d0a13

6 files changed

Lines changed: 6 additions & 13 deletions

File tree

src/app/dashboard/analysis-tools/page.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import { DashboardSidebar } from '@/components/pages/dashboard/sidebar';
2-
import { Button } from '@/components/ui/button';
3-
import { Plus } from 'lucide-react';
4-
import Link from 'next/link';
52
import { UserNav } from '@/components/layout/user-nav';
63

74
export default function AnalysisToolsPage() {

src/app/dashboard/datasets/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
import { useRouter } from 'next/navigation';
1717
import { UserNav } from '@/components/layout/user-nav';
1818

19-
const DatasetItem = ({ file, onDelete }: { file: DatasetFile, onDelete: (name: string) => void }) => {
19+
const DatasetItem = ({ file, onDelete }: { file: DatasetFile, onDelete: (fileName: string) => void }) => {
2020
const router = useRouter();
2121

2222
const handleViewAnalysis = () => {

src/app/dashboard/new-analysis/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { useState } from 'react';
44
import { DashboardSidebar } from '@/components/pages/dashboard/sidebar';
5-
import Link from 'next/link';
65
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from '@/components/ui/card';
76
import { Input } from '@/components/ui/input';
87
import { Label } from '@/components/ui/label';

src/app/dashboard/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { ProjectCard } from '@/components/pages/dashboard/project-card';
77
import { Button } from '@/components/ui/button';
88
import { Input } from '@/components/ui/input';
99
import { Search, ChevronDown, LayoutGrid, List } from 'lucide-react';
10-
import Link from 'next/link';
1110
import { UserNav } from '@/components/layout/user-nav';
1211
import {
1312
DropdownMenu,

src/app/dashboard/settings/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ export default function SettingsPage() {
5656
title: 'Profile Updated',
5757
description: 'Your changes have been saved successfully.',
5858
});
59-
} catch (error: any) {
59+
} catch (error: unknown) {
6060
toast({
6161
variant: 'destructive',
6262
title: 'Error updating profile',
63-
description: error.message,
63+
description: error instanceof Error ? error.message : 'An unknown error occurred',
6464
});
6565
} finally {
6666
setIsSaving(false);
@@ -77,8 +77,8 @@ export default function SettingsPage() {
7777
description: 'Your account has been permanently deleted.',
7878
});
7979
router.push('/login');
80-
} catch (error: any) {
81-
if (error.code === 'auth/requires-recent-login') {
80+
} catch (error: unknown) {
81+
if (error instanceof Error && error.message === 'auth/requires-recent-login') {
8282
toast({
8383
variant: 'destructive',
8484
title: 'Error deleting account',
@@ -88,7 +88,7 @@ export default function SettingsPage() {
8888
toast({
8989
variant: 'destructive',
9090
title: 'Error deleting account',
91-
description: error.message || 'An unexpected error occurred.',
91+
description: error instanceof Error ? error.message : 'An unknown error occurred',
9292
});
9393
}
9494
} finally {

src/app/dashboard/trash/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import { useProjectStore } from '@/hooks/use-project-store';
44
import { DashboardSidebar } from '@/components/pages/dashboard/sidebar';
55
import { ProjectCard } from '@/components/pages/dashboard/project-card';
6-
import type { Project } from '@/lib/types';
7-
import Link from 'next/link';
86
import { UserNav } from '@/components/layout/user-nav';
97

108
export default function TrashPage() {

0 commit comments

Comments
 (0)