feat: Hide the global header on video player pages and ensure video content always uses full screen height.

This commit is contained in:
Yusuf İpek
2026-02-10 14:59:23 +03:00
parent ca65cf8f58
commit 298b4ed3cc
2 changed files with 12 additions and 8 deletions
+11 -7
View File
@@ -4,13 +4,13 @@ import { useState } from 'react';
import Link from 'next/link';
import dynamic from 'next/dynamic';
import { usePathname } from 'next/navigation';
import {
Video,
FolderOpen,
import {
Video,
FolderOpen,
Building2,
Plus,
Settings,
LogOut,
Plus,
Settings,
LogOut,
User,
Menu,
Keyboard
@@ -56,6 +56,10 @@ export function Header({ user }: HeaderProps) {
const pathname = usePathname();
const [shortcutsOpen, setShortcutsOpen] = useState(false);
// Hide header on video player pages — they use full viewport with their own back button
const isVideoPage = /\/videos\/[^/]+$/.test(pathname) || pathname.startsWith('/watch/');
if (isVideoPage) return null;
return (
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<div className="px-6 lg:px-8 flex h-14 items-center w-full">
@@ -121,7 +125,7 @@ export function Header({ user }: HeaderProps) {
New Project
</Link>
</Button>
<Button asChild size="icon" variant="ghost" className="sm:hidden">
<Link href="/projects/new">
<Plus className="h-5 w-5" />