Skip to content

Commit

Permalink
Merge pull request #542 from Kgeek33/fix/animationV2
Browse files Browse the repository at this point in the history
fix: affichage aléatoire de certaines pages
  • Loading branch information
ecnivtwelve authored Dec 27, 2024
2 parents 1304afb + 537eb02 commit db7e1d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/router/screens/account/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export const screenOptions: NativeStackNavigationOptions = {
import { useCurrentAccount } from "@/stores/account";
import createScreen from "@/router/helpers/create-screen";
import Home from "@/views/account/Home/Home";
import type { RouteParameters, Screen } from "@/router/helpers/types";
import type { RouteParameters } from "@/router/helpers/types";
import { Platform } from "react-native";

const HomeStackScreen = ({ accountScreens }: {
accountScreens: Array<ReturnType<typeof createScreen>>
Expand All @@ -34,6 +35,7 @@ const HomeStackScreen = ({ accountScreens }: {
...tabData.options,
tabEnabled: tab.enabled,
presentation: "modal",
animation: Platform.OS === "android" ? "slide_from_right" : "default",
};

return tabData;
Expand All @@ -49,7 +51,8 @@ const HomeStackScreen = ({ accountScreens }: {
// Add Home as the first tab.
newAccountScreens.unshift(
createScreen("HomeScreen", Home, {
headerShown: false
headerShown: false,
animation: Platform.OS === "android" ? "slide_from_right" : "default",
}) as ReturnType<typeof createScreen>
);

Expand Down
5 changes: 3 additions & 2 deletions src/router/screens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ export default [
createScreen("SettingStack", SettingsScreen, {
headerShown: false,
presentation: "modal",
animation: Platform.OS == "android" ? "slide_from_right" : "default",
animation: Platform.OS === "android" ? "slide_from_right" : "default",
animationDuration: 100
}),

createScreen("AccountStack", AccountScreen, {
headerShown: false,
gestureEnabled: false,
animation: "none"
animation: Platform.OS === "android" ? "slide_from_right" : "default",
animationDuration: 100,
}),
] as const;

0 comments on commit db7e1d8

Please sign in to comment.