File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
mobile/main/_components/MainHeader Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,14 @@ export const metadata: Metadata = {
2828export default function RootLayout ( { children } : React . PropsWithChildren ) {
2929 return (
3030 < html lang = "en" suppressHydrationWarning >
31+ < head >
32+ { /* viewport metadata에 추가 했을 시, 경고가 떠서 이쪽에 적었고 head태그를 사용하려면 title도 필요하여 title도 추가하게 되었습니다. */ }
33+ < meta
34+ name = "viewport"
35+ content = "initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width"
36+ />
37+ < title > 빌릴게</ title >
38+ </ head >
3139 < body
3240 className = { `${ geistSans . variable } ${ geistMono . variable } antialiased` }
3341 suppressHydrationWarning
Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ import { getNotificationCount } from '@/apis/notification';
1010export default function MainHeader ( ) {
1111 const router = useRouter ( ) ;
1212 const [ isSidebarOpen , setIsSidebarOpen ] = useState ( false ) ;
13- const [ notificationCount , setNotificationCount ] = useState < number | null > (
14- null ,
15- ) ;
13+ const [ notificationCount , setNotificationCount ] = useState ( 0 ) ;
1614 const [ user , setUser ] = useState < {
1715 name : string ;
1816 id : string ;
@@ -52,9 +50,9 @@ export default function MainHeader() {
5250 onClick = { ( ) => router . push ( '/mobile/notification' ) }
5351 >
5452 < IconAlarm />
55- { notificationCount && (
56- < div className = "absolute -right -0.5 -top-0 .5 flex h-[13px] w-[13px] items-center justify-center rounded-full bg-warning text-caption-2_midi text-white-primary" >
57- { notificationCount }
53+ { notificationCount > 0 && (
54+ < div className = "absolute -top -0.5 left-2 .5 flex h-[13px] w-fit min-w- [13px] items-center justify-center rounded-full bg-warning px-0.5 text-caption-2_midi text-white-primary" >
55+ { notificationCount > 99 ? '99+' : notificationCount }
5856 </ div >
5957 ) }
6058 </ button >
You can’t perform that action at this time.
0 commit comments