mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Fix expo router
This commit is contained in:
parent
4f2cefb1be
commit
58040f8f49
@ -28,7 +28,7 @@
|
|||||||
"expo-linking": "~4.0.1",
|
"expo-linking": "~4.0.1",
|
||||||
"expo-localization": "~14.1.1",
|
"expo-localization": "~14.1.1",
|
||||||
"expo-navigation-bar": "~2.1.1",
|
"expo-navigation-bar": "~2.1.1",
|
||||||
"expo-router": "^1.2.2",
|
"expo-router": "1.5.3",
|
||||||
"expo-screen-orientation": "~5.1.1",
|
"expo-screen-orientation": "~5.1.1",
|
||||||
"expo-secure-store": "~12.1.1",
|
"expo-secure-store": "~12.1.1",
|
||||||
"expo-status-bar": "~1.4.4",
|
"expo-status-bar": "~1.4.4",
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
|
* along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Stack } from "expo-router";
|
import { Stack, useLocalSearchParams } from "expo-router";
|
||||||
import { ComponentType, useEffect } from "react";
|
import { ComponentType, useEffect } from "react";
|
||||||
import { StatusBar, StatusBarProps } from "react-native";
|
import { StatusBar, StatusBarProps } from "react-native";
|
||||||
import * as ScreenOrientation from "expo-screen-orientation";
|
import * as ScreenOrientation from "expo-screen-orientation";
|
||||||
@ -44,13 +44,14 @@ export const withRoute = <Props,>(
|
|||||||
},
|
},
|
||||||
) => {
|
) => {
|
||||||
const { statusBar, fullscreen, ...routeOptions } = options ?? {};
|
const { statusBar, fullscreen, ...routeOptions } = options ?? {};
|
||||||
const WithUseRoute = ({ route, ...props }: Props & { route: any }) => {
|
const WithUseRoute = (props: any) => {
|
||||||
|
const routeParams = useLocalSearchParams();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{routeOptions && <Stack.Screen {...routeOptions} />}
|
{routeOptions && <Stack.Screen {...routeOptions} />}
|
||||||
{statusBar && <StatusBar {...statusBar} />}
|
{statusBar && <StatusBar {...statusBar} />}
|
||||||
{fullscreen && <FullscreenProvider />}
|
{fullscreen && <FullscreenProvider />}
|
||||||
<Component {...route.params} {...props} />
|
<Component {...routeParams} {...props} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
import { Page, QueryIdentifier, useInfiniteFetch } from "@kyoo/models";
|
import { Page, QueryIdentifier, useInfiniteFetch } from "@kyoo/models";
|
||||||
import { HR } from "@kyoo/primitives";
|
import { HR } from "@kyoo/primitives";
|
||||||
import { ComponentType, Fragment, isValidElement, ReactElement, useMemo, useRef } from "react";
|
import { ComponentType, Fragment, isValidElement, ReactElement, useRef } from "react";
|
||||||
import { Stylable, useYoshiki } from "yoshiki";
|
import { Stylable, useYoshiki } from "yoshiki";
|
||||||
import { EmptyView, ErrorView, Layout, WithLoading } from "./fetch";
|
import { EmptyView, ErrorView, Layout, WithLoading } from "./fetch";
|
||||||
|
|
||||||
|
@ -1881,15 +1881,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@expo/metro-runtime@npm:1.1.0":
|
"@expo/metro-runtime@npm:2.0.6":
|
||||||
version: 1.1.0
|
version: 2.0.6
|
||||||
resolution: "@expo/metro-runtime@npm:1.1.0"
|
resolution: "@expo/metro-runtime@npm:2.0.6"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@bacons/react-views": ^1.1.3
|
"@bacons/react-views": ^1.1.3
|
||||||
qs: ^6.10.3
|
qs: ^6.10.3
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react-native: "*"
|
react-native: "*"
|
||||||
checksum: 597a1ace3e950a00043ebd82448a1925e2b8059a4cc1665c0a003a63ff0eb34f6f2481b0872884853a34147208a597f041f95f099756fb701004d4e084d4a008
|
checksum: a4d7d3fa22d617c2675351002a952b705960f983886d5983623e7e752ed11042359c23b7d7ed9e618b63726ca526f26e3c9597fb8c4dd3f2f4742aac0bd17da5
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -6864,12 +6864,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"expo-router@npm:^1.2.2":
|
"expo-router@npm:1.5.3":
|
||||||
version: 1.2.2
|
version: 1.5.3
|
||||||
resolution: "expo-router@npm:1.2.2"
|
resolution: "expo-router@npm:1.5.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@bacons/react-views": ^1.1.3
|
"@bacons/react-views": ^1.1.3
|
||||||
"@expo/metro-runtime": 1.1.0
|
"@expo/metro-runtime": 2.0.6
|
||||||
"@radix-ui/react-slot": ^1.0.0
|
"@radix-ui/react-slot": ^1.0.0
|
||||||
"@react-navigation/bottom-tabs": ~6.5.7
|
"@react-navigation/bottom-tabs": ~6.5.7
|
||||||
"@react-navigation/native": ~6.1.6
|
"@react-navigation/native": ~6.1.6
|
||||||
@ -6884,7 +6884,7 @@ __metadata:
|
|||||||
expo-constants: "*"
|
expo-constants: "*"
|
||||||
expo-linking: "*"
|
expo-linking: "*"
|
||||||
expo-status-bar: "*"
|
expo-status-bar: "*"
|
||||||
metro: ~0.73.7
|
metro: ~0.76.0
|
||||||
react-native-gesture-handler: "*"
|
react-native-gesture-handler: "*"
|
||||||
react-native-reanimated: "*"
|
react-native-reanimated: "*"
|
||||||
react-native-safe-area-context: "*"
|
react-native-safe-area-context: "*"
|
||||||
@ -6894,7 +6894,7 @@ __metadata:
|
|||||||
optional: true
|
optional: true
|
||||||
react-native-reanimated:
|
react-native-reanimated:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: c9e903bbdf3df8223f2dc397c798fc04d6ed3c1cb2d177c0d3f4eb64f6165faafe047257363e1b8ba38d5bf27adadd594a834c374ebd20e6852a50ea7cb2906f
|
checksum: 058435630a609ce29f4af8c0b7b499a6f9d18df9be398c9d2a0ddfc920e149ade40707264c2724bc7bf1e5fe7117c5f87290f7a9e671bfdf934e90912a6530d9
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -10327,7 +10327,7 @@ __metadata:
|
|||||||
expo-linking: ~4.0.1
|
expo-linking: ~4.0.1
|
||||||
expo-localization: ~14.1.1
|
expo-localization: ~14.1.1
|
||||||
expo-navigation-bar: ~2.1.1
|
expo-navigation-bar: ~2.1.1
|
||||||
expo-router: ^1.2.2
|
expo-router: 1.5.3
|
||||||
expo-screen-orientation: ~5.1.1
|
expo-screen-orientation: ~5.1.1
|
||||||
expo-secure-store: ~12.1.1
|
expo-secure-store: ~12.1.1
|
||||||
expo-status-bar: ~1.4.4
|
expo-status-bar: ~1.4.4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user