From 5c9ad939236215e7177c37c504b030e0415369b7 Mon Sep 17 00:00:00 2001 From: spandev <143828642+Spandan-Mishra@users.noreply.github.com> Date: Mon, 10 Nov 2025 01:23:31 +0530 Subject: [PATCH] fix: back button in settings updated to use window history (#24952) * fix: back button in settings updated to use window history * fix: removed label from button * update: added aria-label, Button and useRouter --------- Co-authored-by: Dhairyashil Shinde <93669429+dhairyashiil@users.noreply.github.com> --- .../settings/appDir/SettingsHeader.tsx | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/packages/features/settings/appDir/SettingsHeader.tsx b/packages/features/settings/appDir/SettingsHeader.tsx index 0424539c90..1ca60a1092 100644 --- a/packages/features/settings/appDir/SettingsHeader.tsx +++ b/packages/features/settings/appDir/SettingsHeader.tsx @@ -1,7 +1,12 @@ +"use client"; + import React, { Suspense } from "react"; import classNames from "@calcom/ui/classNames"; import { Icon } from "@calcom/ui/components/icon"; +import { Button } from "@calcom/ui/components/button"; +import { useLocale } from "@calcom/lib/hooks/useLocale"; +import { useRouter } from "next/navigation"; interface HeaderProps { children: React.ReactNode; @@ -22,6 +27,9 @@ export default function Header({ borderInShellHeader, backButton, }: HeaderProps) { + const router = useRouter(); + const { t } = useLocale(); + return (
{backButton && ( - - - +