mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-02 13:26:28 +01:00
fix: correct types
This commit is contained in:
@@ -1,6 +1,15 @@
|
|||||||
|
import { NativeStackNavigationOptions } from "@react-navigation/native-stack";
|
||||||
import { HeaderBackButton } from "../common/HeaderBackButton";
|
import { HeaderBackButton } from "../common/HeaderBackButton";
|
||||||
|
import { ParamListBase, RouteProp } from "@react-navigation/native";
|
||||||
|
|
||||||
const commonScreenOptions = {
|
type ICommonScreenOptions =
|
||||||
|
| NativeStackNavigationOptions
|
||||||
|
| ((prop: {
|
||||||
|
route: RouteProp<ParamListBase, string>;
|
||||||
|
navigation: any;
|
||||||
|
}) => NativeStackNavigationOptions);
|
||||||
|
|
||||||
|
const commonScreenOptions: ICommonScreenOptions = {
|
||||||
title: "",
|
title: "",
|
||||||
headerShown: true,
|
headerShown: true,
|
||||||
headerTransparent: true,
|
headerTransparent: true,
|
||||||
@@ -17,5 +26,5 @@ const routes = [
|
|||||||
"series/[id]",
|
"series/[id]",
|
||||||
];
|
];
|
||||||
|
|
||||||
export const nestedTabPageScreenOptions: { [key: string]: any } =
|
export const nestedTabPageScreenOptions: Record<string, ICommonScreenOptions> =
|
||||||
Object.fromEntries(routes.map((route) => [route, commonScreenOptions]));
|
Object.fromEntries(routes.map((route) => [route, commonScreenOptions]));
|
||||||
|
|||||||
Reference in New Issue
Block a user