Skip to content

Commit

Permalink
revert tab changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abdouAoufi committed Sep 21, 2024
1 parent 391b7f4 commit 07c64fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
10 changes: 2 additions & 8 deletions src/routes/SocialNavigator.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
import * as React from 'react';
import useAuth from '../hooks/useAuth';
import AmitySocialUIKitV4Navigator from '../v4/ila-26/routes/AmitySocialUIKitV4Navigator';
import AmitySocialHomePage from '../v4/ila-26/PublicApi/pages/AmitySocialHomePage/AmitySocialHomePage';

export interface SocialNavigatorProps {
AppsTab?: () => React.ReactNode;
}

export default function SocialNavigator({ AppsTab }: SocialNavigatorProps) {
export default function SocialNavigator() {
const { isConnected } = useAuth();

const Stable = React.useCallback(
() => <AmitySocialHomePage AppsTab={AppsTab} />,
[AppsTab]
);

return <>{isConnected && <AmitySocialUIKitV4Navigator AppsTab={Stable} />}</>;
return <>{isConnected && <AmitySocialUIKitV4Navigator />}</>;
}
10 changes: 3 additions & 7 deletions src/v4/ila-26/routes/AmitySocialUIKitV4Navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import CreateLivestream from '../../../screens/CreateLivestream/CreateLivestream
import PostTargetSelection from '../../screen/PostTargetSelection';
import StoryTargetSelection from '../../PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage';
import EditPost from '../../screen/EditPost/EditPost';
import AmitySocialHomePage from '../PublicApi/pages/AmitySocialHomePage/AmitySocialHomePage';

function truncateText(text: string, maxLength: number = 30): string {
return text.length > maxLength ? `${text.slice(0, maxLength)}...` : text;
Expand Down Expand Up @@ -72,11 +73,7 @@ export const HeaderContainer = ({
);
};

export default function AmitySocialUIKitV4Navigator({
AppsTab,
}: {
AppsTab: () => React.ReactNode;
}) {
export default function AmitySocialUIKitV4Navigator() {
const Stack = createNativeStackNavigator<RootStackParamList>();
const theme = useTheme() as MyMD3Theme;
const styles = useStyles();
Expand All @@ -99,8 +96,7 @@ export default function AmitySocialUIKitV4Navigator({
>
<Stack.Screen
name="Home"
// component={ AmitySocialHomePage}
component={AppsTab}
component={AmitySocialHomePage}
options={{ headerShown: false }}
/>
<Stack.Screen
Expand Down

0 comments on commit 07c64fb

Please sign in to comment.