diff --git a/App.tsx b/App.tsx index c5dc9b95..145069e9 100644 --- a/App.tsx +++ b/App.tsx @@ -1,7 +1,9 @@ import React from 'react' import { QueryCache, ReactQueryCacheProvider, setConsole } from 'react-query' +import { Provider } from 'react-redux' import { Index } from 'src/Index' +import store from 'src/store' const queryCache = new QueryCache() @@ -18,7 +20,9 @@ if (__DEV__) { const App: React.FC = () => ( - + + + ) diff --git a/package.json b/package.json index cdb2a2fc..f4bef584 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,8 @@ "react-navigation": "^4.4.3", "react-query": "^2.26.2", "react-redux": "^7.2.2", + "redux-persist": "^6.0.0", + "redux-persist-expo-securestore": "^2.0.0", "tslib": "^2.0.3" }, "devDependencies": { diff --git a/src/Index.tsx b/src/Index.tsx index 5cffe4a8..0b134b33 100644 --- a/src/Index.tsx +++ b/src/Index.tsx @@ -5,83 +5,77 @@ import { enableScreens } from 'react-native-screens' import React from 'react' import { Feather } from '@expo/vector-icons' -import store from 'src/stacks/common/store' -import { Provider } from 'react-redux' -import Toast from 'react-native-toast-message' -import { StatusBar } from 'expo-status-bar' -import Local from 'src/stacks/Local' -import Public from 'src/stacks/Public' -import PostRoot from 'src/stacks/PostRoot' -import Notifications from 'src/stacks/Notifications' -import Me from 'src/stacks/Me' +// @ts-ignore +import Toast from 'react-native-toast-message' + +import ScreenLocal from 'src/screens/Local' +import ScreenPublic from 'src/screens/Public' +import ScreenNotifications from 'src/screens/Notifications' +import ScreenMe from 'src/screens/Me' enableScreens() const Tab = createBottomTabNavigator() export const Index: React.FC = () => { return ( - - - - - ({ - tabBarIcon: ({ focused, color, size }) => { - let name: string - switch (route.name) { - case 'Local': - name = 'home' - break - case 'Public': - name = 'globe' - break - case 'PostRoot': - name = 'plus' - break - case 'Notifications': - name = 'bell' - break - case 'Me': - name = focused ? 'smile' : 'meh' - break - default: - name = 'alert-octagon' - break - } - return + + ({ + tabBarIcon: ({ focused, color, size }) => { + let name: string + switch (route.name) { + case 'Screen-Local': + name = 'home' + break + case 'Screen-Public': + name = 'globe' + break + case 'Screen-Post': + name = 'plus' + break + case 'Screen-Notifications': + name = 'bell' + break + case 'Screen-Me': + name = focused ? 'smile' : 'meh' + break + default: + name = 'alert-octagon' + break + } + return + } + })} + tabBarOptions={{ + activeTintColor: 'black', + inactiveTintColor: 'gray', + showLabel: false + }} + > + + + <>} + listeners={({ navigation, route }) => ({ + tabPress: e => { + e.preventDefault() + const { + length, + [length - 1]: last + } = navigation.dangerouslyGetState().history + navigation.navigate(last.key.split(new RegExp(/(.*?)-/))[1], { + screen: 'PostToot' + }) } })} - tabBarOptions={{ - activeTintColor: 'black', - inactiveTintColor: 'gray', - showLabel: false - }} - > - - - ({ - tabPress: e => { - e.preventDefault() - const { - length, - [length - 1]: last - } = navigation.dangerouslyGetState().history - navigation.navigate(last.key.split(new RegExp(/(.*?)-/))[1], { - screen: 'PostToot' - }) - } - })} - /> - - - + /> + + + - Toast.setRef(ref)} /> - - + Toast.setRef(ref)} /> + ) } diff --git a/src/api/client.ts b/src/api/client.ts index 67c3057b..98efb6b5 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -1,4 +1,4 @@ -import store, { RootState } from 'src/stacks/common/store' +import store, { RootState } from 'src/store' import ky from 'ky' const client = async ({ diff --git a/src/components/Status/ActionsStatus.tsx b/src/components/Status/ActionsStatus.tsx index 2cddddf4..b58ec455 100644 --- a/src/components/Status/ActionsStatus.tsx +++ b/src/components/Status/ActionsStatus.tsx @@ -13,8 +13,8 @@ import { useMutation, useQueryCache } from 'react-query' import { Feather } from '@expo/vector-icons' import client from 'src/api/client' -import { getLocalAccountId } from 'src/stacks/common/instancesSlice' -import store from 'src/stacks/common/store' +import { getLocalAccountId } from 'src/utils/slices/instancesSlice' +import store from 'src/store' const fireMutation = async ({ id, diff --git a/src/components/Status/Header.tsx b/src/components/Status/Header.tsx index 0d3e598a..7bbf1021 100644 --- a/src/components/Status/Header.tsx +++ b/src/components/Status/Header.tsx @@ -12,8 +12,8 @@ import { useSelector } from 'react-redux' import { getLocalAccountId, getLocalUrl -} from 'src/stacks/common/instancesSlice' -import store from 'src/stacks/common/store' +} from 'src/utils/slices/instancesSlice' +import store from 'src/store' const fireMutation = async ({ id, diff --git a/src/stacks/Local.tsx b/src/screens/Local.tsx similarity index 56% rename from src/stacks/Local.tsx rename to src/screens/Local.tsx index 94d1595c..3ba38557 100644 --- a/src/stacks/Local.tsx +++ b/src/screens/Local.tsx @@ -1,10 +1,10 @@ import React from 'react' -import TimelinesCombined from 'src/stacks/common/TimelinesCombined' +import Timelines from 'src/screens/Timelines/Timelines' -const Local: React.FC = () => { +const ScreenLocal: React.FC = () => { return ( - { ) } -export default Local +export default ScreenLocal diff --git a/src/screens/Me.tsx b/src/screens/Me.tsx new file mode 100644 index 00000000..3a637b80 --- /dev/null +++ b/src/screens/Me.tsx @@ -0,0 +1,19 @@ +import React from 'react' +import { createNativeStackNavigator } from 'react-native-screens/native-stack' + +import ScreenMeRoot from 'src/screens/Me/Root' +import sharedScreens from 'src/screens/Shared/sharedScreens' + +const Stack = createNativeStackNavigator() + +const ScreenMe: React.FC = () => { + return ( + + + + {sharedScreens(Stack)} + + ) +} + +export default ScreenMe diff --git a/src/screens/Me/Root.tsx b/src/screens/Me/Root.tsx new file mode 100644 index 00000000..b9bcc36c --- /dev/null +++ b/src/screens/Me/Root.tsx @@ -0,0 +1,14 @@ +import React from 'react' +import { View } from 'react-native' +import store from 'src/store' +import { getLocalRegistered } from 'src/utils/slices/instancesSlice' + +import Login from './Root/Login' + +const ScreenMeRoot: React.FC = () => { + const localRegistered = getLocalRegistered(store.getState()) + + return {localRegistered ? <> : } +} + +export default ScreenMeRoot diff --git a/src/stacks/Me/Authentication/Instance.tsx b/src/screens/Me/Root/Login.tsx similarity index 95% rename from src/stacks/Me/Authentication/Instance.tsx rename to src/screens/Me/Root/Login.tsx index 90c459db..e9eef039 100644 --- a/src/stacks/Me/Authentication/Instance.tsx +++ b/src/screens/Me/Root/Login.tsx @@ -3,14 +3,14 @@ import { Button, Text, TextInput, View } from 'react-native' import { useQuery } from 'react-query' import { debounce } from 'lodash' -import { instanceFetch } from 'src/stacks/common/instanceFetch' +import { instanceFetch } from 'src/utils/fetches/instanceFetch' import client from 'src/api/client' import * as AuthSession from 'expo-auth-session' import { useDispatch } from 'react-redux' -import { updateLocal } from 'src/stacks/common/instancesSlice' +import { updateLocal } from 'src/utils/slices/instancesSlice' import { useNavigation } from '@react-navigation/native' -const Instance: React.FC = () => { +const Login: React.FC = () => { const navigation = useNavigation() const dispatch = useDispatch() const [instance, setInstance] = useState('') @@ -142,4 +142,4 @@ const Instance: React.FC = () => { ) } -export default Instance +export default Login diff --git a/src/stacks/Notifications.tsx b/src/screens/Notifications.tsx similarity index 80% rename from src/stacks/Notifications.tsx rename to src/screens/Notifications.tsx index d7ed3faf..40e217d8 100644 --- a/src/stacks/Notifications.tsx +++ b/src/screens/Notifications.tsx @@ -2,12 +2,12 @@ import React, { useEffect, useState } from 'react' import { createNativeStackNavigator } from 'react-native-screens/native-stack' import { Feather } from '@expo/vector-icons' -import Timeline from 'src/stacks/common/Timeline' -import sharedScreens from 'src/stacks/Shared/sharedScreens' +import Timeline from 'src/screens/Timelines/Timeline' +import sharedScreens from 'src/screens/Shared/sharedScreens' const Stack = createNativeStackNavigator() -const Notifications: React.FC = () => { +const ScreenNotifications: React.FC = () => { const [renderHeader, setRenderHeader] = useState(false) useEffect(() => { @@ -34,4 +34,4 @@ const Notifications: React.FC = () => { ) } -export default Notifications +export default ScreenNotifications diff --git a/src/stacks/Public.tsx b/src/screens/Public.tsx similarity index 57% rename from src/stacks/Public.tsx rename to src/screens/Public.tsx index 8866dcc8..7dd09f5f 100644 --- a/src/stacks/Public.tsx +++ b/src/screens/Public.tsx @@ -1,10 +1,10 @@ import React from 'react' -import TimelinesCombined from 'src/stacks/common/TimelinesCombined' +import Timelines from 'src/screens/Timelines/Timelines' -const Public: React.FC = () => { +const ScreenPublic: React.FC = () => { return ( - { ) } -export default Public +export default ScreenPublic diff --git a/src/stacks/Shared/Account.tsx b/src/screens/Shared/Account.tsx similarity index 94% rename from src/stacks/Shared/Account.tsx rename to src/screens/Shared/Account.tsx index cf94bc8b..a1c479e9 100644 --- a/src/stacks/Shared/Account.tsx +++ b/src/screens/Shared/Account.tsx @@ -14,9 +14,9 @@ import { Feather } from '@expo/vector-icons' // import * as relationshipsSlice from 'src/stacks/common/relationshipsSlice' import ParseContent from 'src/components/ParseContent' -import Timeline from 'src/stacks/common/Timeline' +import Timeline from 'src/screens/Timelines/Timeline' import { useQuery } from 'react-query' -import { accountFetch } from '../common/accountFetch' +import { accountFetch } from '../../utils/fetches/accountFetch' // Moved account example: https://m.cmx.im/web/accounts/27812 @@ -117,7 +117,11 @@ const Toots = ({ account }: { account: string }) => { ) const horizontalPaging = useRef() - const pages = ['Account_Default', 'Account_All', 'Account_Media'] + const pages: ['Account_Default', 'Account_All', 'Account_Media'] = [ + 'Account_Default', + 'Account_All', + 'Account_Media' + ] return ( <> @@ -184,7 +188,7 @@ export interface Props { } } -const Account: React.FC = ({ +const ScreenSharedAccount: React.FC = ({ route: { params: { id } } @@ -253,4 +257,4 @@ const styles = StyleSheet.create({ } }) -export default Account +export default ScreenSharedAccount diff --git a/src/stacks/Shared/PostToot.tsx b/src/screens/Shared/Compose.tsx similarity index 97% rename from src/stacks/Shared/PostToot.tsx rename to src/screens/Shared/Compose.tsx index 93efee8a..589c2268 100644 --- a/src/stacks/Shared/PostToot.tsx +++ b/src/screens/Shared/Compose.tsx @@ -10,10 +10,10 @@ import { SafeAreaView } from 'react-native-safe-area-context' import { createNativeStackNavigator } from 'react-native-screens/native-stack' import { useNavigation } from '@react-navigation/native' -import store from 'src/stacks/common/store' -import PostMain from './PostToot/PostMain' +import store from 'src/store' +import PostMain from './Compose/PostMain' import client from 'src/api/client' -import { getLocalAccountPreferences } from '../common/instancesSlice' +import { getLocalAccountPreferences } from 'src/utils/slices/instancesSlice' const Stack = createNativeStackNavigator() diff --git a/src/stacks/Shared/PostToot/PostAttachments.tsx b/src/screens/Shared/Compose/PostAttachments.tsx similarity index 96% rename from src/stacks/Shared/PostToot/PostAttachments.tsx rename to src/screens/Shared/Compose/PostAttachments.tsx index 9948a319..2a0812f1 100644 --- a/src/stacks/Shared/PostToot/PostAttachments.tsx +++ b/src/screens/Shared/Compose/PostAttachments.tsx @@ -2,7 +2,7 @@ import React, { Dispatch } from 'react' import { Image, StyleSheet, View } from 'react-native' import { Feather } from '@expo/vector-icons' -import { PostAction, PostState } from '../PostToot' +import { PostAction, PostState } from '../Compose' export interface Props { postState: PostState diff --git a/src/stacks/Shared/PostToot/PostEmojis.tsx b/src/screens/Shared/Compose/PostEmojis.tsx similarity index 94% rename from src/stacks/Shared/PostToot/PostEmojis.tsx rename to src/screens/Shared/Compose/PostEmojis.tsx index feca10e8..0e25f990 100644 --- a/src/stacks/Shared/PostToot/PostEmojis.tsx +++ b/src/screens/Shared/Compose/PostEmojis.tsx @@ -1,7 +1,7 @@ import React, { Dispatch } from 'react' import { Image, Pressable } from 'react-native' -import { PostAction, PostState } from '../PostToot' +import { PostAction, PostState } from '../Compose' import updateText from './updateText' export interface Props { diff --git a/src/stacks/Shared/PostToot/PostMain.tsx b/src/screens/Shared/Compose/PostMain.tsx similarity index 98% rename from src/stacks/Shared/PostToot/PostMain.tsx rename to src/screens/Shared/Compose/PostMain.tsx index 90a13e7b..67075b4a 100644 --- a/src/stacks/Shared/PostToot/PostMain.tsx +++ b/src/screens/Shared/Compose/PostMain.tsx @@ -24,8 +24,8 @@ import Autolinker from 'src/modules/autolinker' import PostEmojis from './PostEmojis' import PostPoll from './PostPoll' import PostSuggestions from './PostSuggestions' -import { emojisFetch } from 'src/stacks/common/emojisFetch' -import { PostAction, PostState } from 'src/stacks/Shared/PostToot' +import { emojisFetch } from 'src/utils/fetches/emojisFetch' +import { PostAction, PostState } from 'src/screens/Shared/Compose' import addAttachments from './addAttachments' import PostAttachments from './PostAttachments' diff --git a/src/stacks/Shared/PostToot/PostPoll.tsx b/src/screens/Shared/Compose/PostPoll.tsx similarity index 98% rename from src/stacks/Shared/PostToot/PostPoll.tsx rename to src/screens/Shared/Compose/PostPoll.tsx index 7908ac1a..880bf1f3 100644 --- a/src/stacks/Shared/PostToot/PostPoll.tsx +++ b/src/screens/Shared/Compose/PostPoll.tsx @@ -9,7 +9,7 @@ import { } from 'react-native' import { Feather } from '@expo/vector-icons' -import { PostAction, PostState } from '../PostToot' +import { PostAction, PostState } from '../Compose' export interface Props { postState: PostState diff --git a/src/stacks/Shared/PostToot/PostSuggestions.tsx b/src/screens/Shared/Compose/PostSuggestions.tsx similarity index 95% rename from src/stacks/Shared/PostToot/PostSuggestions.tsx rename to src/screens/Shared/Compose/PostSuggestions.tsx index a50b9e6e..b4e1da3b 100644 --- a/src/stacks/Shared/PostToot/PostSuggestions.tsx +++ b/src/screens/Shared/Compose/PostSuggestions.tsx @@ -3,8 +3,8 @@ import { ActivityIndicator, Pressable, Text } from 'react-native' import { FlatList } from 'react-native-gesture-handler' import { useQuery } from 'react-query' -import { searchFetch } from '../../common/searchFetch' -import { PostAction, PostState } from '../PostToot' +import { searchFetch } from 'src/utils/fetches/searchFetch' +import { PostAction, PostState } from '../Compose' import updateText from './updateText' declare module 'react' { diff --git a/src/stacks/Shared/PostToot/addAttachments.ts b/src/screens/Shared/Compose/addAttachments.ts similarity index 97% rename from src/stacks/Shared/PostToot/addAttachments.ts rename to src/screens/Shared/Compose/addAttachments.ts index 8323bcdf..346ecea6 100644 --- a/src/stacks/Shared/PostToot/addAttachments.ts +++ b/src/screens/Shared/Compose/addAttachments.ts @@ -3,7 +3,7 @@ import { ActionSheetIOS, Alert } from 'react-native' import * as ImagePicker from 'expo-image-picker' import { ImageInfo } from 'expo-image-picker/build/ImagePicker.types' -import { PostAction, PostState } from '../PostToot' +import { PostAction, PostState } from '../Compose' import client from 'src/api/client' const uploadAttachment = async (uri: ImageInfo['uri']) => { diff --git a/src/stacks/Shared/PostToot/updateText.ts b/src/screens/Shared/Compose/updateText.ts similarity index 91% rename from src/stacks/Shared/PostToot/updateText.ts rename to src/screens/Shared/Compose/updateText.ts index e2122ff6..86cce07a 100644 --- a/src/stacks/Shared/PostToot/updateText.ts +++ b/src/screens/Shared/Compose/updateText.ts @@ -1,4 +1,4 @@ -import { PostState } from '../PostToot' +import { PostState } from '../Compose' const updateText = ({ onChangeText, diff --git a/src/stacks/Shared/Hashtag.tsx b/src/screens/Shared/Hashtag.tsx similarity index 67% rename from src/stacks/Shared/Hashtag.tsx rename to src/screens/Shared/Hashtag.tsx index 60a58268..939b8ff3 100644 --- a/src/stacks/Shared/Hashtag.tsx +++ b/src/screens/Shared/Hashtag.tsx @@ -1,6 +1,6 @@ import React from 'react' -import Timeline from 'src/stacks/common/Timeline' +import Timeline from 'src/screens/Timelines/Timeline' // Show remote hashtag? Only when private, show local version? @@ -12,7 +12,7 @@ export interface Props { } } -const Hashtag: React.FC = ({ +const ScreenSharedHashtag: React.FC = ({ route: { params: { hashtag } } @@ -20,4 +20,4 @@ const Hashtag: React.FC = ({ return } -export default Hashtag +export default ScreenSharedHashtag diff --git a/src/stacks/Shared/Toot.tsx b/src/screens/Shared/Toot.tsx similarity index 68% rename from src/stacks/Shared/Toot.tsx rename to src/screens/Shared/Toot.tsx index 44020f23..5d39feee 100644 --- a/src/stacks/Shared/Toot.tsx +++ b/src/screens/Shared/Toot.tsx @@ -1,6 +1,6 @@ import React from 'react' -import Timeline from 'src/stacks/common/Timeline' +import Timeline from 'src/screens/Timelines/Timeline' // Show remote hashtag? Only when private, show local version? @@ -12,7 +12,7 @@ export interface Props { } } -const Toot: React.FC = ({ +const ScreenSharedToot: React.FC = ({ route: { params: { toot } } @@ -20,4 +20,4 @@ const Toot: React.FC = ({ return } -export default Toot +export default ScreenSharedToot diff --git a/src/stacks/Shared/Webview.tsx b/src/screens/Shared/Webview.tsx similarity index 76% rename from src/stacks/Shared/Webview.tsx rename to src/screens/Shared/Webview.tsx index 5251be2e..97553013 100644 --- a/src/stacks/Shared/Webview.tsx +++ b/src/screens/Shared/Webview.tsx @@ -11,7 +11,7 @@ export interface Props { } } -const Webview: React.FC = ({ +const ScreenSharedWebview: React.FC = ({ route: { params: { uri } } @@ -19,4 +19,4 @@ const Webview: React.FC = ({ return } -export default Webview +export default ScreenSharedWebview diff --git a/src/screens/Shared/sharedScreens.tsx b/src/screens/Shared/sharedScreens.tsx new file mode 100644 index 00000000..3731a068 --- /dev/null +++ b/src/screens/Shared/sharedScreens.tsx @@ -0,0 +1,56 @@ +import React from 'react' + +import ScreenSharedAccount from 'src/screens/Shared/Account' +import ScreenSharedHashtag from 'src/screens/Shared/Hashtag' +import ScreenSharedToot from 'src/screens/Shared/Toot' +import ScreenSharedWebview from 'src/screens/Shared/Webview' +import PostToot from 'src/screens/Shared/Compose' + +const sharedScreens = (Stack: any) => { + return [ + {} + }} + />, + ({ + title: `#${decodeURIComponent(route.params.hashtag)}` + })} + />, + ({ + title: '对话' + })} + />, + ({ + // title: `${route.params.domain}` + // })} + />, + + ] +} + +export default sharedScreens diff --git a/src/stacks/common/Timeline.tsx b/src/screens/Timelines/Timeline.tsx similarity index 97% rename from src/stacks/common/Timeline.tsx rename to src/screens/Timelines/Timeline.tsx index 3c324e2f..8e5b658a 100644 --- a/src/stacks/common/Timeline.tsx +++ b/src/screens/Timelines/Timeline.tsx @@ -4,7 +4,7 @@ import { setFocusHandler, useInfiniteQuery } from 'react-query' import StatusInNotifications from 'src/components/StatusInNotifications' import StatusInTimeline from 'src/components/StatusInTimeline' -import { timelineFetch } from './timelineFetch' +import { timelineFetch } from 'src/utils/fetches/timelineFetch' // Opening nesting hashtag pages diff --git a/src/stacks/common/TimelinesCombined.tsx b/src/screens/Timelines/Timelines.tsx similarity index 75% rename from src/stacks/common/TimelinesCombined.tsx rename to src/screens/Timelines/Timelines.tsx index d860dbaa..b4abe79f 100644 --- a/src/stacks/common/TimelinesCombined.tsx +++ b/src/screens/Timelines/Timelines.tsx @@ -1,20 +1,31 @@ import React, { useEffect, useRef, useState } from 'react' import { Dimensions, FlatList, Text, View } from 'react-native' -import { createNativeStackNavigator } from 'react-native-screens/native-stack' import SegmentedControl from '@react-native-community/segmented-control' +import { createNativeStackNavigator } from 'react-native-screens/native-stack' +import { useSelector } from 'react-redux' import { Feather } from '@expo/vector-icons' import Timeline from './Timeline' -import sharedScreens from 'src/stacks/Shared/sharedScreens' -import { getLocalRegistered } from './instancesSlice' -import store from './store' +import sharedScreens from 'src/screens/Shared/sharedScreens' +import { InstancesState } from 'src/utils/slices/instancesSlice' +import { RootState } from 'src/store' const Stack = createNativeStackNavigator() -const Page = ({ item: { page } }: { item: { page: App.Pages } }) => { +const Page = ({ + item: { page }, + localRegistered +}: { + item: { page: App.Pages } + localRegistered: InstancesState['local']['url'] | undefined +}) => { return ( - + {localRegistered || page === 'RemotePublic' ? ( + + ) : ( + 请先登录 + )} ) } @@ -24,8 +35,10 @@ export interface Props { content: { title: string; page: App.Pages }[] } -const TimelinesCombined: React.FC = ({ name, content }) => { - const localRegistered = getLocalRegistered(store.getState()) +const Timelines: React.FC = ({ name, content }) => { + const localRegistered = useSelector( + (state: RootState) => state.instances.local.url + ) const [segment, setSegment] = useState(0) const [renderHeader, setRenderHeader] = useState(false) const [segmentManuallyTriggered, setSegmentManuallyTriggered] = useState( @@ -37,7 +50,7 @@ const TimelinesCombined: React.FC = ({ name, content }) => { return }, []) - const horizontalPaging = useRef(null!) + const horizontalPaging = useRef(null!) return ( @@ -69,16 +82,11 @@ const TimelinesCombined: React.FC = ({ name, content }) => { page} - renderItem={({ item, index }) => { - return localRegistered || item.page === 'RemotePublic' ? ( - - ) : ( - - 请先登录 - - ) - }} + renderItem={({ item, index }) => ( + + )} ref={horizontalPaging} bounces={false} getItemLayout={(data, index) => ({ @@ -108,4 +116,4 @@ const TimelinesCombined: React.FC = ({ name, content }) => { ) } -export default TimelinesCombined +export default Timelines diff --git a/src/stacks/Me.tsx b/src/stacks/Me.tsx deleted file mode 100644 index 707d6785..00000000 --- a/src/stacks/Me.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react' -import { createNativeStackNavigator } from 'react-native-screens/native-stack' - -import Base from './Me/Base' -import Authentication from 'src/stacks/Me/Authentication' - -import sharedScreens from 'src/stacks/Shared/sharedScreens' - -const Stack = createNativeStackNavigator() - -export type ScreenMe = { - 'Me-Base': undefined - 'Me-Authentication': undefined -} - -const Me: React.FC = () => { - return ( - - - - - {sharedScreens(Stack)} - - ) -} - -export default Me diff --git a/src/stacks/Me/Authentication.tsx b/src/stacks/Me/Authentication.tsx deleted file mode 100644 index 8290515e..00000000 --- a/src/stacks/Me/Authentication.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react' -import { createNativeStackNavigator } from 'react-native-screens/native-stack' - -import Instance from './Authentication/Instance' - -const Stack = createNativeStackNavigator() - -export type ScreenMeAuthentication = { - 'Me-Authentication-Instance': undefined -} - -const Base = () => { - return ( - - - - ) -} - -export default Base diff --git a/src/stacks/Me/Base.tsx b/src/stacks/Me/Base.tsx deleted file mode 100644 index ce94d345..00000000 --- a/src/stacks/Me/Base.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react' -import { Button, View } from 'react-native' -import { StackNavigationProp } from '@react-navigation/stack' - -import { ScreenMe } from '../Me' - -export interface Props { - navigation: StackNavigationProp -} - -const Base: React.FC = ({ navigation: { navigate } }) => { - return ( - -