Design: 헤더 z-index 설정

This commit is contained in:
jhynsoo 2024-10-08 15:53:10 +09:00
parent 97c4ff5126
commit f1c054ea9b
5 changed files with 6 additions and 14 deletions

View File

@ -6,22 +6,14 @@ import { Suspense } from 'react';
import AlarmPopover from './AlarmPopover'; import AlarmPopover from './AlarmPopover';
import ProfilePopover from './ProfilePopover'; import ProfilePopover from './ProfilePopover';
export interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {} export default function Header() {
export default function Header({ className, ...props }: HeaderProps) {
const location = useLocation(); const location = useLocation();
const isHomePage = location.pathname === '/'; const isHomePage = location.pathname === '/';
const profile = useAuthStore((state) => state.profile); const profile = useAuthStore((state) => state.profile);
return ( return (
<header <header className="fixed left-0 top-0 z-40 flex h-16 w-full items-center justify-between border-b border-gray-200 bg-white px-4 sm:px-6 md:px-8 lg:px-10">
className={cn(
'flex h-16 w-full items-center justify-between border-b border-gray-200 bg-white px-4 sm:px-6 md:px-8 lg:px-10',
className
)}
{...props}
>
<div className="flex items-center gap-4 md:gap-10"> <div className="flex items-center gap-4 md:gap-10">
<Link <Link
to="/" to="/"

View File

@ -18,7 +18,7 @@ export default function ManageLayout({ tabTitle }: { tabTitle: string }) {
return ( return (
<> <>
<Header className="fixed left-0 top-0 w-full" /> <Header />
<div className="flex min-h-screen flex-col justify-between"> <div className="flex min-h-screen flex-col justify-between">
<div className="mt-16 flex flex-1"> <div className="mt-16 flex flex-1">

View File

@ -6,7 +6,7 @@ import { Suspense } from 'react';
export default function PageLayout() { export default function PageLayout() {
return ( return (
<> <>
<Header className="fixed left-0 top-0 w-full" /> <Header />
<div className="flex min-h-screen flex-col justify-between"> <div className="flex min-h-screen flex-col justify-between">
<div className="mt-16 flex flex-1"> <div className="mt-16 flex flex-1">
<Suspense fallback={<div></div>}> <Suspense fallback={<div></div>}>

View File

@ -92,7 +92,7 @@ export default function WorkspaceBrowseLayout() {
return ( return (
<> <>
<Header className="fixed left-0 top-0 w-full" /> <Header />
<div className="flex min-h-screen flex-col justify-between"> <div className="flex min-h-screen flex-col justify-between">
<div className="mt-16 flex flex-1"> <div className="mt-16 flex flex-1">

View File

@ -46,7 +46,7 @@ export default function WorkspaceLayout() {
return ( return (
<> <>
<Header className="fixed left-0 top-0" /> <Header />
<div className="mt-16 h-[calc(100vh-64px)] w-screen"> <div className="mt-16 h-[calc(100vh-64px)] w-screen">
<ResizablePanelGroup direction="horizontal"> <ResizablePanelGroup direction="horizontal">
<WorkspaceSidebar <WorkspaceSidebar