mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-26 06:44:58 +00:00
code: nextjs,frontends,tsx (3 files)
This commit is contained in:
0
dbal/cpp/src/daemon/http/http_server.hpp
Normal file
0
dbal/cpp/src/daemon/http/http_server.hpp
Normal file
22
frontends/nextjs/src/app/(auth)/admin/page.tsx
Normal file
22
frontends/nextjs/src/app/(auth)/admin/page.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user