Flag deleting orgs

This commit is contained in:
Owen
2025-07-14 12:38:58 -07:00
parent 7f227932da
commit 2f20397c60

View File

@@ -36,6 +36,7 @@ import {
} from "@app/components/Settings"; } from "@app/components/Settings";
import { useUserContext } from "@app/hooks/useUserContext"; import { useUserContext } from "@app/hooks/useUserContext";
import { useTranslations } from "next-intl"; import { useTranslations } from "next-intl";
import { build } from "@server/build";
// Updated schema to include subnet field // Updated schema to include subnet field
const GeneralFormSchema = z.object({ const GeneralFormSchema = z.object({
@@ -238,27 +239,29 @@ export default function GeneralPage() {
</Button> </Button>
</SettingsSectionFooter> </SettingsSectionFooter>
</SettingsSection> </SettingsSection>
<SettingsSection> {build === "oss" && (
<SettingsSectionHeader> <SettingsSection>
<SettingsSectionTitle> <SettingsSectionHeader>
{t("orgDangerZone")} <SettingsSectionTitle>
</SettingsSectionTitle> {t("orgDangerZone")}
<SettingsSectionDescription> </SettingsSectionTitle>
{t("orgDangerZoneDescription")} <SettingsSectionDescription>
</SettingsSectionDescription> {t("orgDangerZoneDescription")}
</SettingsSectionHeader> </SettingsSectionDescription>
<SettingsSectionFooter> </SettingsSectionHeader>
<Button <SettingsSectionFooter>
variant="destructive" <Button
onClick={() => setIsDeleteModalOpen(true)} variant="destructive"
className="flex items-center gap-2" onClick={() => setIsDeleteModalOpen(true)}
loading={loadingDelete} className="flex items-center gap-2"
disabled={loadingDelete} loading={loadingDelete}
> disabled={loadingDelete}
{t("orgDelete")} >
</Button> {t("orgDelete")}
</SettingsSectionFooter> </Button>
</SettingsSection> </SettingsSectionFooter>
</SettingsSection>
)}
</SettingsContainer> </SettingsContainer>
); );
} }