code: nextjs,frontends,tsx (3 files)

This commit is contained in:
2025-12-26 00:40:23 +00:00
parent 599bc94776
commit e9fd2b7411
3 changed files with 40 additions and 0 deletions

View File

View File

@@ -0,0 +1,22 @@
"use client"
import { Level3 } from '@/components/Level3'
import { AuthGate } from '@/components/auth/AuthGate'
import { PageLoader } from '@/components/auth/PageLoader'
import { useResolvedUser } from '@/hooks/useResolvedUser'
import { useLevelRouting } from '@/hooks/useLevelRouting'
export default function AdminPage() {
const { user, isLoading } = useResolvedUser()
const { onNavigate, onLogout } = useLevelRouting()
return (
<AuthGate requiredRole="admin">
{isLoading || !user ? (
<PageLoader message="Loading admin workspace..." />
) : (
<Level3 user={user} onLogout={onLogout} onNavigate={onNavigate} />
)}
</AuthGate>
)
}

View File

@@ -84,6 +84,19 @@ const notificationCenterMetadata: PackageSeedConfig['metadata'] = {
}
const notificationCenterExamples: any = {}
const socialHubComponents: any[] = []
const socialHubMetadata: PackageSeedConfig['metadata'] = {
packageId: 'social_hub',
name: 'Social Hub',
version: '1.0.0',
description: 'Social feed package with live rooms and creator updates',
author: 'MetaBuilder',
category: 'social',
dependencies: [],
exports: { components: [] },
}
const socialHubExamples: any = {}
export const DEFAULT_PACKAGES: Record<string, PackageSeedConfig> = {
admin_dialog: {
metadata: adminDialogMetadata,
@@ -115,4 +128,9 @@ export const DEFAULT_PACKAGES: Record<string, PackageSeedConfig> = {
components: notificationCenterComponents,
examples: notificationCenterExamples,
},
social_hub: {
metadata: socialHubMetadata,
components: socialHubComponents,
examples: socialHubExamples,
},
}