File tree Expand file tree Collapse file tree 2 files changed +25
-11
lines changed
Expand file tree Collapse file tree 2 files changed +25
-11
lines changed Original file line number Diff line number Diff line change 1+ import { ReactNode } from "react" ;
12import { useLocation } from "react-router-dom" ;
23import SubHeader from "@/components/header/SubHeader" ;
34import MainHeader from "@/components/header/MainHeader" ;
@@ -7,25 +8,35 @@ type HeaderProps = {
78 title ?: string ;
89 showPreviousIcon ?: boolean ;
910 showShareIcon ?: boolean ;
11+ children ?: ReactNode ;
1012} ;
1113
1214const Header = ( {
1315 title = "" ,
1416 showPreviousIcon = true ,
15- showShareIcon = false
17+ showShareIcon = false ,
18+ children
1619} : HeaderProps ) => {
1720 const { pathname } = useLocation ( ) ;
1821 const { isLoggedIn } = useAuthStore ( ) ;
1922 const isHomepage = pathname === "/" ;
2023
21- return isHomepage ? (
22- < MainHeader isLoggedIn = { isLoggedIn } />
23- ) : (
24- < SubHeader
25- title = { title }
26- showPreviousIcon = { showPreviousIcon }
27- showShareIcon = { showShareIcon }
28- />
24+ return (
25+ < >
26+ < div className = "fixed z-50 w-[360px] bg-white md:w-[375px] lg:w-[500px]" >
27+ { isHomepage ? (
28+ < MainHeader isLoggedIn = { isLoggedIn } />
29+ ) : (
30+ < SubHeader
31+ title = { title }
32+ showPreviousIcon = { showPreviousIcon }
33+ showShareIcon = { showShareIcon }
34+ />
35+ ) }
36+ </ div >
37+
38+ < div className = "pt-14" > { children } </ div >
39+ </ >
2940 ) ;
3041} ;
3142
Original file line number Diff line number Diff line change @@ -19,10 +19,13 @@ const ActionConfirmModal = ({
1919} : AlertProps ) => {
2020 return (
2121 < div
22- className = "absolute inset-0 z-50 flex items-center justify-center bg-black/50"
22+ className = "fixed inset-0 z-50 flex items-center justify-center bg-black/50"
2323 onClick = { onCancel }
2424 >
25- < div className = "flex h-[200px] w-[294px] flex-col items-center justify-center rounded-2xl bg-white" >
25+ < div
26+ className = "flex h-[200px] w-[294px] flex-col items-center justify-center rounded-2xl bg-white"
27+ onClick = { ( e ) => e . stopPropagation ( ) }
28+ >
2629 < h3 className = "text-2xl font-bold" > { title } </ h3 >
2730 < p className = "mt-[9px] text-center text-xl font-medium" >
2831 { message . map ( ( line , index ) => (
You can’t perform that action at this time.
0 commit comments