mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
Co-authored-by: Alex Kim <alexkim@Alexs-MacBook-Pro.local> Co-authored-by: Alex <111128610+Alexk2309@users.noreply.github.com> Co-authored-by: Simon-Eklundh <simon.eklundh@proton.me>
33 lines
1013 B
TypeScript
33 lines
1013 B
TypeScript
import type { ParamListBase, RouteProp } from "@react-navigation/native";
|
|
import type { NativeStackNavigationOptions } from "@react-navigation/native-stack";
|
|
import { Platform } from "react-native";
|
|
import { HeaderBackButton } from "../common/HeaderBackButton";
|
|
|
|
type ICommonScreenOptions =
|
|
| NativeStackNavigationOptions
|
|
| ((prop: {
|
|
route: RouteProp<ParamListBase, string>;
|
|
navigation: any;
|
|
}) => NativeStackNavigationOptions);
|
|
|
|
export const commonScreenOptions: ICommonScreenOptions = {
|
|
title: "",
|
|
headerShown: true,
|
|
headerTransparent: Platform.OS === "ios",
|
|
headerShadowVisible: false,
|
|
headerBlurEffect: "none",
|
|
headerLeft: () => <HeaderBackButton />,
|
|
};
|
|
|
|
const routes = [
|
|
"persons/[personId]",
|
|
"items/page",
|
|
"series/[id]",
|
|
"music/album/[albumId]",
|
|
"music/artist/[artistId]",
|
|
"music/playlist/[playlistId]",
|
|
];
|
|
|
|
export const nestedTabPageScreenOptions: Record<string, ICommonScreenOptions> =
|
|
Object.fromEntries(routes.map((route) => [route, commonScreenOptions]));
|