Fix: Plugin loader import + games model name + loading state
Local Build and Deploy / deploy (push) Successful in 1m31s
Local Build and Deploy / deploy (push) Successful in 1m31s
- Import plugin loader in admin-nav.ts so plugins actually register - Fix Prisma model name from 'gameRoom' to 'gameRooms' - Add loading skeleton for games admin page
This commit is contained in:
1 parent
27a7b8404b
commit
8bf48f46e7
3 files changed
+19
-1
No files matched your search
@@ -0,0 +1,17 @@
|
|||||||
|
import { Skeleton } from "@/components/ui/skeleton";
|
||||||
|
|
||||||
|
export default function GamesLoading() {
|
||||||
|
return (
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||||
|
{Array.from({ length: 4 }).map((_, i) => (
|
||||||
|
<div key={i} className="admin-card p-5 flex items-center gap-4">
|
||||||
|
<Skeleton className="w-12 h-12 rounded-xl" />
|
||||||
|
<div className="space-y-2">
|
||||||
|
<Skeleton className="h-8 w-20" />
|
||||||
|
<Skeleton className="h-4 w-24" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ export default async function GameRoomsPage({
|
|||||||
const result = await fetchAdminList(
|
const result = await fetchAdminList(
|
||||||
{
|
{
|
||||||
permission: "admin.games.view",
|
permission: "admin.games.view",
|
||||||
model: "gameRoom",
|
model: "gameRooms",
|
||||||
searchFields: ["game"],
|
searchFields: ["game"],
|
||||||
defaultSort: { createdAt: "desc" },
|
defaultSort: { createdAt: "desc" },
|
||||||
mapRow: (r: {
|
mapRow: (r: {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import {
|
|||||||
Wrench,
|
Wrench,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { pluginRegistry } from "@/lib/plugins";
|
import { pluginRegistry } from "@/lib/plugins";
|
||||||
|
import "@/lib/plugins/loader";
|
||||||
|
|
||||||
export interface AdminHubTab {
|
export interface AdminHubTab {
|
||||||
href: string;
|
href: string;
|
||||||
|
|||||||
Reference in new issue
Block a user