diff --git a/src/enum/tabNameState.ts b/src/enum/tabNameState.ts index 11170e6a..c15371bf 100644 --- a/src/enum/tabNameState.ts +++ b/src/enum/tabNameState.ts @@ -6,11 +6,3 @@ export enum TabName { Communities = 'Communities', Accounts = 'Accounts', } - -export type TabNameSubset = - | TabName.Accounts - | TabName.Communities - | TabName.Explorer - | TabName.Gallery - | TabName.NewsFeed - | TabName.Timeline; diff --git a/src/screens/CommunityHome/index.tsx b/src/screens/CommunityHome/index.tsx index cff6ed39..0315d0a0 100644 --- a/src/screens/CommunityHome/index.tsx +++ b/src/screens/CommunityHome/index.tsx @@ -37,7 +37,7 @@ import { useFocusEffect, useNavigation } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import FloatingButton from '../../components/FloatingButton'; import useImage from '../../hooks/useImage'; -import { TabName, TabNameSubset } from '../../enum/tabNameState'; +import { TabName } from '../../enum/tabNameState'; export type FeedRefType = { handleLoadMore: () => void; @@ -200,7 +200,7 @@ export default function CommunityHome({ route }: any) { ); }; - const handleTab = (tabName: TabNameSubset) => { + const handleTab = (tabName: TabName) => { console.log('index: ', tabName); //this func not implmented yet }; diff --git a/src/screens/CommunitySearch/index.tsx b/src/screens/CommunitySearch/index.tsx index 5d4864f5..d59da55e 100644 --- a/src/screens/CommunitySearch/index.tsx +++ b/src/screens/CommunitySearch/index.tsx @@ -21,7 +21,7 @@ import type { ISearchItem } from '../../components/SearchItem'; import SearchItem from '../../components/SearchItem'; import { useTheme } from 'react-native-paper'; import type { MyMD3Theme } from '../../providers/amity-ui-kit-provider'; -import { TabName, TabNameSubset } from '../../enum/tabNameState'; +import { TabName } from '../../enum/tabNameState'; enum searchTypeEnum { user = 'user', @@ -130,7 +130,7 @@ export default function CommunitySearch() { const cancelSearch = () => { navigation.goBack(); }; - const handleTabChange = (tabName: TabNameSubset) => { + const handleTabChange = (tabName: TabName) => { if (tabName === TabName.Communities) { setSearchType(searchTypeEnum.community); if (searchTerm.length > 0) { diff --git a/src/screens/Home/index.tsx b/src/screens/Home/index.tsx index e11bab32..5dbe72da 100644 --- a/src/screens/Home/index.tsx +++ b/src/screens/Home/index.tsx @@ -22,14 +22,14 @@ import CreatePostModal from '../../components/CreatePostModal'; import CustomTab from '../../components/CustomTab'; import { useTheme } from 'react-native-paper'; import type { MyMD3Theme } from '../../providers/amity-ui-kit-provider'; -import { TabName, TabNameSubset } from '../../enum/tabNameState'; +import { TabName } from '../../enum/tabNameState'; LogBox.ignoreAllLogs(true); export default function Home() { // const { t, i18n } = useTranslation(); const styles = getStyles(); const { client } = useAuth(); const theme = useTheme() as MyMD3Theme; - const [activeTab, setActiveTab] = useState(TabName.NewsFeed); + const [activeTab, setActiveTab] = useState(TabName.NewsFeed); const [isVisible, setIsVisible] = useState(false); const [createPostModalVisible, setCreatePostModalVisible] = useState(false); diff --git a/src/screens/UserProfile/UserProfile.tsx b/src/screens/UserProfile/UserProfile.tsx index 2b74b5b9..fa8b8e38 100644 --- a/src/screens/UserProfile/UserProfile.tsx +++ b/src/screens/UserProfile/UserProfile.tsx @@ -26,7 +26,7 @@ import { editIcon } from '../../svg/svg-xml-list'; import type { MyMD3Theme } from '../../providers/amity-ui-kit-provider'; import { useTheme } from 'react-native-paper'; import FloatingButton from '../../components/FloatingButton'; -import { TabName, TabNameSubset } from '../../enum/tabNameState'; +import { TabName } from '../../enum/tabNameState'; export default function UserProfile({ route }: any) { const theme = useTheme() as MyMD3Theme; @@ -151,7 +151,7 @@ export default function UserProfile({ route }: any) { ); }; - const handleTab = (tabName: TabNameSubset) => { + const handleTab = (tabName: TabName) => { console.log('index: ', tabName); //this func not implmented yet }; const handleScroll = (event: NativeSyntheticEvent) => {