--------- Co-authored-by: Rem Helper <remhelper@abunchofknowitalls.com> Reviewed-on: https://git.abunchofknowitalls.com/joshuafhiggins/otunes/pulls/14
34 lines
963 B
TypeScript
34 lines
963 B
TypeScript
import { Stack } from "expo-router"
|
|
|
|
import { ProfileHeaderButton } from "@/components/profile-header-button"
|
|
import { tabStackScreenTitles, useStackScreenOptions } from "@/lib/navigation"
|
|
|
|
export const unstable_settings = {
|
|
initialRouteName: "index",
|
|
}
|
|
|
|
export default function LibraryLayout() {
|
|
const baseOptions = useStackScreenOptions({ title: "Library" })
|
|
|
|
return (
|
|
<Stack
|
|
initialRouteName="index"
|
|
screenOptions={({ route }) => ({
|
|
...baseOptions,
|
|
title: tabStackScreenTitles[route.name] ?? "Library",
|
|
headerRight: route.name === "settings" ? undefined : () => <ProfileHeaderButton />,
|
|
unstable_headerRightItems:
|
|
route.name === "settings"
|
|
? undefined
|
|
: () => [
|
|
{
|
|
type: "custom",
|
|
element: <ProfileHeaderButton />,
|
|
hidesSharedBackground: true,
|
|
},
|
|
],
|
|
})}
|
|
/>
|
|
)
|
|
}
|