diff --git a/app/(app)/(tabs)/_layout.tsx b/app/(app)/(tabs)/_layout.tsx new file mode 100644 index 0000000..50d3712 --- /dev/null +++ b/app/(app)/(tabs)/_layout.tsx @@ -0,0 +1,56 @@ +import {Pressable, View} from 'react-native'; +import {Icon, useDooboo} from 'dooboo-ui'; +import {Link, Tabs, useRouter} from 'expo-router'; + +function SettingsMenu(): JSX.Element { + const {theme} = useDooboo(); + const {push} = useRouter(); + + return ( + + push('settings')}> + {({pressed}) => ( + + )} + + + ); +} + +export default function TabLayout(): JSX.Element { + const {theme} = useDooboo(); + + return ( + + ( + + ), + headerRight: () => {SettingsMenu()}, + }} + /> + ( + + ), + headerRight: () => {SettingsMenu()}, + }} + /> + + ); +} diff --git a/app/(app)/(tabs)/index.tsx b/app/(app)/(tabs)/index.tsx new file mode 100644 index 0000000..927c346 --- /dev/null +++ b/app/(app)/(tabs)/index.tsx @@ -0,0 +1,29 @@ +import {View} from 'react-native'; +import styled, {css} from '@emotion/native'; +import {Fab, Typography} from 'dooboo-ui'; +import {Stack} from 'expo-router'; + +const Container = styled.View` + flex: 1; + align-self: stretch; + background-color: ${({theme}) => theme.bg.basic}; +`; + +export default function Community(): JSX.Element { + return ( + + + 커뮤니티 + { + console.log('onPressFab'); + }} + style={css` + bottom: 16px; + `} + /> + + ); +} diff --git a/app/(app)/(tabs)/profile.tsx b/app/(app)/(tabs)/profile.tsx new file mode 100644 index 0000000..a8d8524 --- /dev/null +++ b/app/(app)/(tabs)/profile.tsx @@ -0,0 +1,11 @@ +import {View} from 'react-native'; +import {Typography} from 'dooboo-ui'; +import {Stack} from 'expo-router'; + +export default function Index(): JSX.Element { + return ( + + 프로필 + + ); +} diff --git a/app/(app)/index.tsx b/app/(app)/index.tsx deleted file mode 100644 index f354883..0000000 --- a/app/(app)/index.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import styled, {css} from '@emotion/native'; -import AsyncStorage from '@react-native-async-storage/async-storage'; -import {Button, SwitchToggle, useDooboo} from 'dooboo-ui'; -import {Redirect, Stack, useRouter} from 'expo-router'; -import {useRecoilValue} from 'recoil'; - -import {authRecoilState} from '../../src/recoil/atoms'; -import {t} from '../../src/STRINGS'; -import {AsyncStorageKey} from '../../src/utils/constants'; - -const Container = styled.View` - background-color: ${({theme}) => theme.bg.basic}; - - flex: 1; - align-self: stretch; - justify-content: center; - align-items: center; -`; - -const Content = styled.View` - padding: 16px; - - justify-content: center; - align-items: center; -`; - -export default function Index(): JSX.Element { - const {themeType, changeThemeType} = useDooboo(); - const {push} = useRouter(); - const authId = useRecoilValue(authRecoilState); - - if (!authId) { - return ; - } - - // if (loading) { - // return ; - // } - - return ( - - - - { - const nextTheme = themeType === 'dark' ? 'light' : 'dark'; - AsyncStorage.setItem( - AsyncStorageKey.DarkMode, - themeType === 'dark' ? 'false' : 'true', - ); - changeThemeType(nextTheme); - }} - /> -