mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
24 lines
827 B
TypeScript
24 lines
827 B
TypeScript
import type { ParamListBase, RouteProp } from "@react-navigation/native";
|
|
import type { NativeStackNavigationOptions } from "@react-navigation/native-stack";
|
|
import { HeaderBackButton } from "../common/HeaderBackButton";
|
|
|
|
type ICommonScreenOptions =
|
|
| NativeStackNavigationOptions
|
|
| ((prop: {
|
|
route: RouteProp<ParamListBase, string>;
|
|
navigation: any;
|
|
}) => NativeStackNavigationOptions);
|
|
|
|
export const commonScreenOptions: ICommonScreenOptions = {
|
|
title: "",
|
|
headerShown: true,
|
|
headerTransparent: true,
|
|
headerShadowVisible: false,
|
|
headerLeft: () => <HeaderBackButton />,
|
|
};
|
|
|
|
const routes = ["actors/[actorId]", "items/page", "series/[id]"];
|
|
|
|
export const nestedTabPageScreenOptions: Record<string, ICommonScreenOptions> =
|
|
Object.fromEntries(routes.map((route) => [route, commonScreenOptions]));
|