From b813fc627a9738a3dfc913edd2776e1a1739e961 Mon Sep 17 00:00:00 2001 From: creature-water-valley <83949308+creature-water-valley@users.noreply.github.com> Date: Fri, 1 Jul 2022 14:22:06 +0900 Subject: [PATCH] Change from native stack to stack in bottom tabs --- .../src/@types/react-navigation.d.ts | 9 + .../src/__snapshots__/App.test.tsx.snap | 450 ++++++++++++++---- .../src/navigation/HomeStackNav.tsx | 9 +- .../src/navigation/TeamStackNav.tsx | 9 +- .../src/screens/home/HomeScreen.tsx | 2 +- .../src/screens/team/TeamDetailScreen.tsx | 2 +- 6 files changed, 378 insertions(+), 103 deletions(-) diff --git a/example-app/SantokuApp/src/@types/react-navigation.d.ts b/example-app/SantokuApp/src/@types/react-navigation.d.ts index 741026c227..0065eefb9d 100644 --- a/example-app/SantokuApp/src/@types/react-navigation.d.ts +++ b/example-app/SantokuApp/src/@types/react-navigation.d.ts @@ -4,8 +4,17 @@ import {NavigationState, RouteConfig, TabNavigationState} from '@react-navigatio import {NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {NativeStackNavigationEventMap} from '@react-navigation/native-stack/lib/typescript/src/types'; import type {ParamListBase} from '@react-navigation/routers'; +import {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack/lib/typescript/src/types'; declare global { + type StackScreenConfig = RouteConfig< + ParamList, + RouteName, + NavigationState, + StackNavigationOptions, + StackNavigationEventMap + >; + type NativeStackScreenConfig = RouteConfig< ParamList, RouteName, diff --git a/example-app/SantokuApp/src/__snapshots__/App.test.tsx.snap b/example-app/SantokuApp/src/__snapshots__/App.test.tsx.snap index 82f7ba37e5..c65c1a8393 100644 --- a/example-app/SantokuApp/src/__snapshots__/App.test.tsx.snap +++ b/example-app/SantokuApp/src/__snapshots__/App.test.tsx.snap @@ -207,163 +207,419 @@ exports[`App マウントされたときに正常にレンダリングされる >