mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-11-01 16:46:58 +00:00
chore: add skeletons to tables and loading.tsx files for routes and run formatting ♻️
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 12m20s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 12m20s
This commit is contained in:
22
app/(dashboard)/parental-control/loading.tsx
Normal file
22
app/(dashboard)/parental-control/loading.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import DevicesTableSkeleton from "@/components/device-table-skeleton";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
|
||||
export default function LoadingComponent() {
|
||||
return (
|
||||
<div>
|
||||
<div className="flex justify-between items-center border rounded-md border-dashed font-bold title-bg py-4 px-2 mb-4">
|
||||
<Skeleton className="w-48 h-8" />
|
||||
<Skeleton className="w-20 h-8" />
|
||||
</div>
|
||||
<div
|
||||
id="user-filters"
|
||||
className=" pb-4 gap-4 flex sm:flex-row flex-col items-start justify-endO"
|
||||
>
|
||||
<DevicesTableSkeleton
|
||||
headers={["Device Name", "Mac Address", "Vendor", "#"]}
|
||||
length={10}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Suspense } from "react";
|
||||
import DevicesTableSkeleton from "@/components/device-table-skeleton";
|
||||
import { DevicesTable } from "@/components/devices-table";
|
||||
import DynamicFilter from "@/components/generic-filter";
|
||||
|
||||
@@ -51,7 +52,15 @@ export default async function ParentalControl({
|
||||
]}
|
||||
/>{" "}
|
||||
</div>
|
||||
<Suspense key={(await searchParams).page} fallback={"loading...."}>
|
||||
<Suspense
|
||||
key={(await searchParams).page}
|
||||
fallback={
|
||||
<DevicesTableSkeleton
|
||||
headers={["Device Name", "Mac Address", "Vendor", "#"]}
|
||||
length={10}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<DevicesTable
|
||||
parentalControl={true}
|
||||
searchParams={searchParams}
|
||||
|
||||
Reference in New Issue
Block a user