refactor: serve static frontend with Go APIs
This commit is contained in:
1 parent
763d2f0648
commit
b14b4fced7
101 files changed
+963
-3928
No files matched your search
+10
-7
@@ -1,10 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { AccountManager } from "@/components/account-manager";
|
||||
import { hasAdminSessionAccess } from "@/lib/auth/permissions";
|
||||
import { requireAppSession } from "@/lib/server/auth/current-user";
|
||||
import { BrowserAuthGuard, useBrowserAuth } from "@/components/browser-auth";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function AccountsPage() {
|
||||
const session = await requireAppSession();
|
||||
return <AccountManager canManageAccounts={hasAdminSessionAccess(session)} />;
|
||||
export default function AccountsPage() {
|
||||
return <BrowserAuthGuard><AccountsContent /></BrowserAuthGuard>;
|
||||
}
|
||||
|
||||
function AccountsContent() {
|
||||
const { isAdmin } = useBrowserAuth();
|
||||
return <AccountManager canManageAccounts={isAdmin} />;
|
||||
}
|
||||
Reference in new issue
Block a user