@@ -6,6 +6,7 @@ import { toast } from "sonner";
66import { ScanForm , type ScanFormData } from "@/components/dashboard/scan-form" ;
77import { DeviceTable } from "@/components/dashboard/device-table" ;
88import { BulkActionsDialog } from "@/components/dashboard/bulk-actions-dialog" ;
9+ import { Footer } from "@/components/ui/footer" ;
910import { deviceApi , handleApiError } from "@/lib/api" ;
1011import type { Device } from "@/types/api" ;
1112
@@ -46,31 +47,37 @@ export function Dashboard() {
4647 } ;
4748
4849 return (
49- < div className = "space-y-8" >
50- { /* Header */ }
51- < div >
52- < h1 className = "text-3xl font-bold tracking-tight" >
53- { t ( "dashboard.title" ) }
54- </ h1 >
55- < p className = "text-muted-foreground" > { t ( "dashboard.subtitle" ) } </ p >
56- </ div >
50+ < div className = "min-h-[calc(100vh-8rem)] flex flex-col" >
51+ { /* Main Content */ }
52+ < div className = "flex-1 space-y-8" >
53+ { /* Header */ }
54+ < div >
55+ < h1 className = "text-3xl font-bold tracking-tight" >
56+ { t ( "dashboard.title" ) }
57+ </ h1 >
58+ < p className = "text-muted-foreground" > { t ( "dashboard.subtitle" ) } </ p >
59+ </ div >
5760
58- { /* Scan Form */ }
59- < ScanForm onSubmit = { handleScan } isLoading = { scanMutation . isPending } />
61+ { /* Scan Form */ }
62+ < ScanForm onSubmit = { handleScan } isLoading = { scanMutation . isPending } />
6063
61- { /* Error Display */ }
62- { scanMutation . error && (
63- < div className = "p-4 border border-destructive/50 bg-destructive/10 rounded-lg" >
64- < p className = "text-sm text-destructive" >
65- { handleApiError ( scanMutation . error ) }
66- </ p >
67- </ div >
68- ) }
64+ { /* Error Display */ }
65+ { scanMutation . error && (
66+ < div className = "p-4 border border-destructive/50 bg-destructive/10 rounded-lg" >
67+ < p className = "text-sm text-destructive" >
68+ { handleApiError ( scanMutation . error ) }
69+ </ p >
70+ </ div >
71+ ) }
72+
73+ { /* Device Table */ }
74+ { devices . length > 0 && (
75+ < DeviceTable devices = { devices } onBulkAction = { handleBulkAction } />
76+ ) }
77+ </ div >
6978
70- { /* Device Table */ }
71- { devices . length > 0 && (
72- < DeviceTable devices = { devices } onBulkAction = { handleBulkAction } />
73- ) }
79+ { /* Sticky Footer */ }
80+ < Footer className = "mt-8" />
7481
7582 { /* Bulk Actions Dialog */ }
7683 < BulkActionsDialog
0 commit comments