diff --git a/server/routers/site/listSites.ts b/server/routers/site/listSites.ts
index f449b7c4..83adefa2 100644
--- a/server/routers/site/listSites.ts
+++ b/server/routers/site/listSites.ts
@@ -76,7 +76,7 @@ export async function listSites(
return next(
createHttpError(
HttpCode.BAD_REQUEST,
- parsedParams.error.errors.map((e) => e.message).join(", ")
+ fromError(parsedParams.error)
)
);
}
diff --git a/src/app/[orgId]/settings/access/users/[userId]/access-controls/page.tsx b/src/app/[orgId]/settings/access/users/[userId]/access-controls/page.tsx
index e9d54c5a..62992860 100644
--- a/src/app/[orgId]/settings/access/users/[userId]/access-controls/page.tsx
+++ b/src/app/[orgId]/settings/access/users/[userId]/access-controls/page.tsx
@@ -118,7 +118,7 @@ export default function AccessControlsPage() {
+ >
+ );
+}
diff --git a/src/app/[orgId]/settings/sites/[niceId]/layout.tsx b/src/app/[orgId]/settings/sites/[niceId]/layout.tsx
index 972177ed..2b3da1f1 100644
--- a/src/app/[orgId]/settings/sites/[niceId]/layout.tsx
+++ b/src/app/[orgId]/settings/sites/[niceId]/layout.tsx
@@ -5,6 +5,8 @@ import { AxiosResponse } from "axios";
import { redirect } from "next/navigation";
import { authCookieHeader } from "@app/api/cookies";
import { SidebarSettings } from "@app/components/SidebarSettings";
+import Link from "next/link";
+import { ArrowLeft } from "lucide-react";
interface SettingsLayoutProps {
children: React.ReactNode;
@@ -17,50 +19,53 @@ export default async function SettingsLayout(props: SettingsLayoutProps) {
const { children } = props;
let site = null;
-
- if (params.niceId !== "create") {
- try {
- const res = await internal.get>(
- `/org/${params.orgId}/site/${params.niceId}`,
- await authCookieHeader()
- );
- site = res.data.data;
- } catch {
- redirect(`/${params.orgId}/settings/sites`);
- }
+ try {
+ const res = await internal.get>(
+ `/org/${params.orgId}/site/${params.niceId}`,
+ await authCookieHeader()
+ );
+ site = res.data.data;
+ } catch {
+ redirect(`/${params.orgId}/settings/sites`);
}
const sidebarNavItems = [
{
title: "General",
- href: "/{orgId}/settings/sites/{niceId}",
+ href: "/{orgId}/settings/sites/{niceId}/general",
},
];
- const isCreate = params.niceId === "create";
-
return (
<>
+
+
- {isCreate ? "New Site" : site?.name + " Settings"}
+ {site?.name + " Settings"}
- {isCreate
- ? "Create a new site"
- : "Configure the settings on your site: " +
- site?.name || ""}
- .
+ Configure the settings on your site
-
- {children}
-
+
+
+ {children}
+
+
>
);
}
diff --git a/src/app/[orgId]/settings/sites/[niceId]/page.tsx b/src/app/[orgId]/settings/sites/[niceId]/page.tsx
index e611c73e..045b762e 100644
--- a/src/app/[orgId]/settings/sites/[niceId]/page.tsx
+++ b/src/app/[orgId]/settings/sites/[niceId]/page.tsx
@@ -1,29 +1,8 @@
-import React from "react";
-import { Separator } from "@/components/ui/separator";
-import { CreateSiteForm } from "./components/CreateSite";
-import { GeneralForm } from "./components/GeneralForm";
+import { redirect } from "next/navigation";
export default async function SitePage(props: {
- params: Promise<{ niceId: string }>;
+ params: Promise<{ orgId: string; niceId: string }>;
}) {
const params = await props.params;
- const isCreate = params.niceId === "create";
-
- return (
-
-
-
- {isCreate ? "Create Site" : "General"}
-
-
- {isCreate
- ? "Create a new site"
- : "Edit basic site settings"}
-
-
-
-
- {isCreate ?
:
}
-
- );
+ redirect(`/${params.orgId}/settings/sites/${params.niceId}/general`);
}
diff --git a/src/app/[orgId]/settings/sites/components/CreateSiteForm.tsx b/src/app/[orgId]/settings/sites/components/CreateSiteForm.tsx
index da3fe58f..10a864c6 100644
--- a/src/app/[orgId]/settings/sites/components/CreateSiteForm.tsx
+++ b/src/app/[orgId]/settings/sites/components/CreateSiteForm.tsx
@@ -133,6 +133,9 @@ export default function CreateSiteForm({ open, setOpen }: CreateSiteFormProps) {
const niceId = res.data.data.niceId;
// navigate to the site page
router.push(`/${orgId}/settings/sites/${niceId}`);
+
+ // close the modal
+ setOpen(false);
}
setLoading(false);
@@ -258,6 +261,11 @@ sh get-docker.sh`;
)}
+
+ You will only be able to see the
+ configuration once.
+
+
{
- // router.push(`/${orgId}/settings/sites/create`);
setIsCreateModalOpen(true);
}}
/>
diff --git a/src/app/profile/account/account-form.tsx b/src/app/profile/account/account-form.tsx
index a3f48044..25b22370 100644
--- a/src/app/profile/account/account-form.tsx
+++ b/src/app/profile/account/account-form.tsx
@@ -88,7 +88,7 @@ export function AccountForm() {
return (
-
+
diff --git a/src/app/profile/notifications/notifications-form.tsx b/src/app/profile/notifications/notifications-form.tsx
index 0eb215b5..a5e8ab8c 100644
--- a/src/app/profile/notifications/notifications-form.tsx
+++ b/src/app/profile/notifications/notifications-form.tsx
@@ -60,7 +60,7 @@ export function NotificationsForm() {
return (
-
+
-
+
-
+
-
+
-
+
-
+
-
+