feat: Toggle to hide Team Profile link on Booker (#20369)
* hide team profile link on booker * fix ts errors --------- Co-authored-by: amrit <[email protected]>
This commit is contained in:
1 parent
ea250febbc
commit
2aa583bb6d
9 files changed
+29
-3
No files matched your search
@@ -14,9 +14,9 @@ import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback";
|
||||
import { MembershipRole } from "@calcom/prisma/enums";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { Button } from "@calcom/ui/components/button";
|
||||
import { Form } from "@calcom/ui/components/form";
|
||||
import { SettingsToggle } from "@calcom/ui/components/form";
|
||||
import { Button } from "@calcom/ui/components/button";
|
||||
import { showToast } from "@calcom/ui/components/toast";
|
||||
|
||||
import ThemeLabel from "../../../settings/ThemeLabel";
|
||||
@@ -34,6 +34,7 @@ const ProfileView = ({ team }: ProfileViewProps) => {
|
||||
|
||||
const [hideBrandingValue, setHideBrandingValue] = useState(team?.hideBranding ?? false);
|
||||
const [hideBookATeamMember, setHideBookATeamMember] = useState(team?.hideBookATeamMember ?? false);
|
||||
const [hideTeamProfileLink, setHideTeamProfileLink] = useState(team?.hideTeamProfileLink ?? false);
|
||||
|
||||
const themeForm = useForm<{ theme: string | null | undefined }>({
|
||||
defaultValues: {
|
||||
@@ -168,6 +169,18 @@ const ProfileView = ({ team }: ProfileViewProps) => {
|
||||
mutation.mutate({ id: team.id, hideBookATeamMember: checked });
|
||||
}}
|
||||
/>
|
||||
|
||||
<SettingsToggle
|
||||
toggleSwitchAtTheEnd={true}
|
||||
title={t("hide_team_profile_link")}
|
||||
disabled={mutation?.isPending}
|
||||
description={t("hide_team_profile_link_description")}
|
||||
checked={hideTeamProfileLink ?? false}
|
||||
onCheckedChange={(checked) => {
|
||||
setHideTeamProfileLink(checked);
|
||||
mutation.mutate({ id: team.id, hideTeamProfileLink: checked });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user