major ui tweaks and refactoring

This commit is contained in:
Milo Schwartz
2025-01-04 20:22:01 -05:00
parent 51bf5c1408
commit 64158a823b
91 changed files with 1791 additions and 1246 deletions

View File

@@ -1,5 +1,6 @@
import ProfileIcon from "@app/components/ProfileIcon";
import { verifySession } from "@app/lib/auth/verifySession";
import { pullEnv } from "@app/lib/pullEnv";
import UserProvider from "@app/providers/UserProvider";
import { Metadata } from "next";
import { redirect } from "next/navigation";
@@ -20,12 +21,14 @@ export default async function SetupLayout({
const getUser = cache(verifySession);
const user = await getUser();
const env = pullEnv();
if (!user) {
redirect("/?redirect=/setup");
}
if (
!(process.env.DISABLE_USER_CREATE_ORG === "false" || user.serverAdmin)
!(!env.flags.disableUserCreateOrg || user.serverAdmin)
) {
redirect("/");
}