refactor: migrate to vite and restructure repo

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-10-18 14:02:20 +00:00
parent 83a5f92506
commit 25796ab609
94 changed files with 478 additions and 312 deletions

View File

@@ -0,0 +1,46 @@
import { useState } from "react"
import { Button } from "@/components/ui/button"
import { DirectoryContentTableSkeleton } from "./directory-content-table-skeleton"
import { DirectoryPageSkeleton } from "./directory-page-skeleton"
export function SkeletonDemo() {
const [showPageSkeleton, setShowPageSkeleton] = useState(false)
const [showTableSkeleton, setShowTableSkeleton] = useState(false)
return (
<div className="p-4 space-y-4">
<div className="flex gap-2">
<Button
onClick={() => setShowPageSkeleton(!showPageSkeleton)}
variant={showPageSkeleton ? "default" : "outline"}
>
{showPageSkeleton ? "Hide" : "Show"} Page Skeleton
</Button>
<Button
onClick={() => setShowTableSkeleton(!showTableSkeleton)}
variant={showTableSkeleton ? "default" : "outline"}
>
{showTableSkeleton ? "Hide" : "Show"} Table Skeleton
</Button>
</div>
{showPageSkeleton && (
<div className="border rounded-lg p-4">
<h3 className="text-lg font-semibold mb-4">
Directory Page Skeleton
</h3>
<DirectoryPageSkeleton />
</div>
)}
{showTableSkeleton && (
<div className="border rounded-lg p-4">
<h3 className="text-lg font-semibold mb-4">
Directory Content Table Skeleton
</h3>
<DirectoryContentTableSkeleton rows={5} />
</div>
)}
</div>
)
}