@@ -6,7 +6,6 @@ import { useParams, usePathname } from "next/navigation";
66import { useRef } from "react" ;
77import { toast } from "sonner" ;
88import NotFound from "@/app/not-found" ;
9- import { Skeleton } from "@/components/ui/skeleton" ;
109import { useTrackingSetup } from "@/hooks/use-tracking-setup" ;
1110import { useWebsite } from "@/hooks/use-websites" ;
1211import { isAnalyticsRefreshingAtom } from "@/stores/jotai/filterAtoms" ;
@@ -99,66 +98,11 @@ export default function WebsiteLayout({ children }: WebsiteLayoutProps) {
9998 < div
10099 className = { `${ isAssistantPage ? "min-h-0 flex-1" : "min-h-0 flex-1 overflow-y-auto overscroll-contain" } ` }
101100 >
102- { ! isAssistantPage && isTrackingSetupLoading ? (
103- < div className = "space-y-4 p-4" >
104- { /* Two DataTables side by side */ }
105- < div className = "grid grid-cols-1 gap-4 lg:grid-cols-2" >
106- { [ 1 , 2 ] . map ( ( num ) => (
107- < div
108- className = "overflow-hidden rounded border bg-sidebar"
109- key = { `skeleton-table-${ num } ` }
110- >
111- < div className = "p-3" >
112- < Skeleton className = "h-5 w-32" />
113- < Skeleton className = "mt-1 h-3 w-48" />
114- </ div >
115- < div className = "space-y-2 px-3 pb-3" >
116- { Array . from ( { length : 5 } ) . map ( ( _ , idx ) => (
117- < div
118- className = "flex items-center gap-3 rounded bg-muted/20 p-3"
119- key = { `row-${ num } -${ idx } ` }
120- >
121- < Skeleton className = "size-6 shrink-0 rounded-full" />
122- < div className = "flex-1 space-y-1.5" >
123- < Skeleton className = "h-4 w-3/4" />
124- < Skeleton className = "h-3 w-1/2" />
125- </ div >
126- < Skeleton className = "h-4 w-12" />
127- </ div >
128- ) ) }
129- </ div >
130- </ div >
131- ) ) }
132- </ div >
133- { /* Full width DataTable */ }
134- < div className = "overflow-hidden rounded border bg-sidebar" >
135- < div className = "p-3" >
136- < Skeleton className = "h-5 w-40" />
137- < Skeleton className = "mt-1 h-3 w-64" />
138- < div className = "mt-3 flex gap-2" >
139- { [ 1 , 2 , 3 , 4 ] . map ( ( tab ) => (
140- < Skeleton className = "h-8 w-20" key = { `tab-${ tab } ` } />
141- ) ) }
142- </ div >
143- </ div >
144- < div className = "space-y-2 px-3 pb-3" >
145- { Array . from ( { length : 6 } ) . map ( ( _ , idx ) => (
146- < div
147- className = "flex items-center gap-3 rounded bg-muted/20 p-3"
148- key = { `geo-row-${ idx } ` }
149- >
150- < Skeleton className = "size-6 shrink-0 rounded" />
151- < div className = "flex-1 space-y-1.5" >
152- < Skeleton className = "h-4 w-2/3" />
153- < Skeleton className = "h-3 w-1/3" />
154- </ div >
155- < Skeleton className = "h-4 w-16" />
156- </ div >
157- ) ) }
158- </ div >
159- </ div >
160- </ div >
161- ) : ! ( isAssistantPage || isTrackingSetupLoading ) &&
101+ { isAssistantPage ? (
102+ children
103+ ) : websiteData &&
104+ ! isTrackingSetupLoading &&
105+ isTrackingSetup !== null &&
162106 isTrackingSetup === false ? (
163107 < div className = "p-4" >
164108 < WebsiteTrackingSetupTab websiteId = { websiteId } />
0 commit comments