-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡️ add large titles on ios, improve tab navigation and icons
- Loading branch information
1 parent
92fc6dd
commit 8c1eea0
Showing
15 changed files
with
208 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,17 @@ | ||
import { DrawerToggleButton } from '@react-navigation/drawer'; | ||
import { useRouterSettings } from 'app/hooks/router'; | ||
import { Stack } from 'expo-router'; | ||
import React from 'react'; | ||
import { View, Text, SafeAreaView, TouchableOpacity } from 'react-native'; | ||
import useCustomStyles from 'app/hooks/useCustomStyles'; | ||
import { useIsMobileView } from 'app/hooks/common'; | ||
import { useNavigate } from 'app/hooks/navigation'; | ||
import { useAuthUser } from 'app/modules/auth'; | ||
import { Button } from 'tamagui'; | ||
import { EvilIcons } from '@expo/vector-icons'; | ||
import SVGLogoComponent from 'app/components/logo'; | ||
import useTheme from 'app/hooks/useTheme'; | ||
import { DrawerActions } from '@react-navigation/native'; | ||
import { Slot } from 'expo-router'; | ||
import { DrawerToggleButton } from '@react-navigation/drawer'; | ||
|
||
export default function StackLayout() { | ||
const user = useAuthUser(); | ||
const isMobileView = useIsMobileView(); | ||
const { currentTheme } = useTheme(); | ||
const styles = useCustomStyles(loadStyles); | ||
const navigate = useNavigate(); | ||
|
||
const { layoutStackScreenOptionsHeaderSettings } = useRouterSettings(); | ||
return ( | ||
<Stack | ||
screenOptions={{ | ||
headerRight: () => <DrawerToggleButton />, | ||
headerTitleStyle: { | ||
fontSize: 24, | ||
}, | ||
headerStyle: { | ||
backgroundColor: currentTheme.colors.secondaryBlue, | ||
}, | ||
headerTintColor: currentTheme.colors.text, | ||
...layoutStackScreenOptionsHeaderSettings, | ||
headerBlurEffect: 'systemChromeMaterial', | ||
}} | ||
/> | ||
); | ||
} | ||
|
||
const loadStyles = (theme) => { | ||
const { currentTheme } = theme; | ||
|
||
return { | ||
drawerStyles: { | ||
backgroundColor: currentTheme.colors.background, | ||
}, | ||
safeArea: { | ||
backgroundColor: currentTheme.colors.background, | ||
}, | ||
container: { | ||
width: '100%', | ||
backgroundColor: currentTheme.colors.background, | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
}, | ||
header: { | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
padding: 16, | ||
width: '100%', | ||
}, | ||
logoContainer: { | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
}, | ||
logoWrapper: { | ||
marginHorizontal: 10, | ||
}, | ||
logoText: { | ||
color: currentTheme.colors.text, | ||
fontSize: 38, | ||
fontWeight: '900', | ||
}, | ||
menuBar: { | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'flex-end', | ||
paddingHorizontal: 16, | ||
height: 60, | ||
}, | ||
menuBarItem: { | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
gap: 8, | ||
paddingHorizontal: 12, | ||
}, | ||
menuBarItemText: { | ||
color: currentTheme.colors.text, | ||
fontSize: 18, | ||
}, | ||
drawerTrigger: {}, | ||
menuBarItemActive: { | ||
// Apply styles for the active item | ||
// ... | ||
}, | ||
menuBarItemTextActive: { | ||
// Apply styles for the active item's text | ||
// ... | ||
}, | ||
menuBarItemSelected: { | ||
// Apply styles for the selected item | ||
// ... | ||
}, | ||
menuBarItemTextSelected: { | ||
// Apply styles for the selected item's text | ||
// ... | ||
}, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { DrawerToggleButton } from '@react-navigation/drawer'; | ||
import { useRouterSettings } from 'app/hooks/router'; | ||
import { Stack } from 'expo-router'; | ||
import React from 'react'; | ||
|
||
export default function StackLayout() { | ||
const { layoutStackScreenOptionsHeaderSettings } = useRouterSettings(); | ||
return ( | ||
<Stack | ||
screenOptions={{ | ||
headerRight: () => <DrawerToggleButton />, | ||
...layoutStackScreenOptionsHeaderSettings, | ||
headerBlurEffect: 'systemChromeMaterial', | ||
title: 'Feed', | ||
}} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { DrawerToggleButton } from '@react-navigation/drawer'; | ||
import { useRouterSettings } from 'app/hooks/router'; | ||
import { Stack } from 'expo-router'; | ||
import React from 'react'; | ||
|
||
export default function StackLayout() { | ||
const { layoutStackScreenOptionsHeaderSettings } = useRouterSettings(); | ||
return ( | ||
<Stack | ||
screenOptions={{ | ||
headerRight: () => <DrawerToggleButton />, | ||
...layoutStackScreenOptionsHeaderSettings, | ||
headerBlurEffect: 'systemChromeMaterial', | ||
}} | ||
/> | ||
); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { DrawerToggleButton } from '@react-navigation/drawer'; | ||
import { useRouterSettings } from 'app/hooks/router'; | ||
import { Stack } from 'expo-router'; | ||
import React from 'react'; | ||
|
||
export default function StackLayout() { | ||
const { layoutStackScreenOptionsHeaderSettings } = useRouterSettings(); | ||
return ( | ||
<Stack | ||
screenOptions={{ | ||
headerRight: () => <DrawerToggleButton />, | ||
...layoutStackScreenOptionsHeaderSettings, | ||
headerBlurEffect: 'systemChromeMaterial', | ||
}} | ||
/> | ||
); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { DrawerToggleButton } from '@react-navigation/drawer'; | ||
import { useRouterSettings } from 'app/hooks/router'; | ||
import { Stack } from 'expo-router'; | ||
import React from 'react'; | ||
|
||
export default function StackLayout() { | ||
return ( | ||
<Stack | ||
screenOptions={{ | ||
headerRight: () => <DrawerToggleButton />, | ||
headerBlurEffect: 'systemChromeMaterial', | ||
title: 'Profile', | ||
}} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.