Skip to content

Commit

Permalink
Update settings nav menu
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-robitaille committed Sep 23, 2024
1 parent 609039d commit 479546b
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
"use client";
import React from "react";
import { useTranslation } from "@i18n/client";
import { SubNavLink } from "@clientComponents/globals/SubNavLink";
import { EmailIcon, BrandIcon, GearIcon, ProtectedIcon } from "@serverComponents/icons";
import { useFlag } from "@lib/hooks/useFlag";
import { useIsAdminUser } from "@lib/hooks/form-builder";

export const SettingsNavigation = ({ id }: { id: string }) => {
const {
t,
i18n: { language },
} = useTranslation("form-builder");

const isAPIEnalbed = useFlag("zitadelAuth");
const isAdmin = useIsAdminUser();

return (
<div className="relative flex">
Expand All @@ -35,7 +34,7 @@ export const SettingsNavigation = ({ id }: { id: string }) => {
{t("settings.formManagement")}
</span>
</SubNavLink>
{isAPIEnalbed.status === true && (
{isAdmin && (
<SubNavLink href={`/${language}/form-builder/${id}/settings/api`}>
<span className="text-sm laptop:text-base">
<ProtectedIcon className="mr-2 inline-block laptop:mt-[-2px]" />
Expand Down

0 comments on commit 479546b

Please sign in to comment.