feat: standalone page config to use in companion (#27018)
* feat: hide navigation when ?standalone=true URL parameter is present Co-Authored-By: [email protected] <[email protected]> * feat: standalone page config to use in companion --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
This commit is contained in:
7 files changed
+107
-9
No files matched your search
@@ -2,6 +2,7 @@ import { useSession } from "next-auth/react";
|
||||
import Link from "next/link";
|
||||
|
||||
import { useIsEmbed } from "@calcom/embed-core/embed-iframe";
|
||||
import { useIsStandalone } from "@calcom/lib/hooks/useIsStandalone";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Icon } from "@calcom/ui/components/icon";
|
||||
import { Logo } from "@calcom/ui/components/logo";
|
||||
@@ -11,7 +12,8 @@ import { UserDropdown } from "./user-dropdown/UserDropdown";
|
||||
|
||||
export function TopNavContainer() {
|
||||
const { status } = useSession();
|
||||
if (status !== "authenticated") return null;
|
||||
const isStandalone = useIsStandalone();
|
||||
if (status !== "authenticated" || isStandalone) return null;
|
||||
return <TopNav />;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user