@@ -7,6 +7,7 @@ import { browserSettingsAtom } from '@/lib/atoms'
7
7
import { useEffect , useState } from 'react'
8
8
import AboutModal from './AboutModal'
9
9
import { HabitIcon , TaskIcon } from '@/lib/constants'
10
+ import { useHelpers } from '@/lib/client-helpers'
10
11
11
12
type ViewPort = 'main' | 'mobile'
12
13
@@ -33,6 +34,7 @@ export default function Navigation({ className, viewPort }: NavigationProps) {
33
34
const [ isMobileView , setIsMobileView ] = useState ( false )
34
35
const [ browserSettings ] = useAtom ( browserSettingsAtom )
35
36
const isTasksView = browserSettings . viewType === 'tasks'
37
+ const { isIOS } = useHelpers ( )
36
38
37
39
useEffect ( ( ) => {
38
40
const handleResize = ( ) => {
@@ -52,14 +54,14 @@ export default function Navigation({ className, viewPort }: NavigationProps) {
52
54
if ( viewPort === 'mobile' && isMobileView ) {
53
55
return (
54
56
< >
55
- < div className = "pb-16" /> { /* Add padding at the bottom to prevent content from being hidden */ }
56
- < nav className = " lg:hidden fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 shadow-lg" >
57
- < div className = "flex justify-around" >
57
+ < div className = { isIOS ? "pb-20" : "pb- 16"} /> { /* Add padding at the bottom to prevent content from being hidden */ }
58
+ < nav className = { ` lg:hidden fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 shadow-lg ${ isIOS ? "pb-4" : "" } ` } >
59
+ < div className = "flex justify-around divide-x divide-gray-300/60 dark:divide-gray-600/60 " >
58
60
{ [ ...navItems ( isTasksView ) . filter ( item => item . position === 'main' ) , ...navItems ( isTasksView ) . filter ( item => item . position === 'bottom' ) ] . map ( ( item ) => (
59
61
< Link
60
62
key = { item . label }
61
63
href = { item . href }
62
- className = "flex flex-col items-center py-2 text-gray-600 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400"
64
+ className = "flex flex-col items-center py-2 px-4 text-gray-600 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400 flex-1 "
63
65
>
64
66
< item . icon className = "h-6 w-6" />
65
67
< span className = "text-xs mt-1" > { item . label } </ span >
0 commit comments