Files
otunes/apps/mobile/app/(app)/(tabs)/search/_layout.tsx
T

34 lines
913 B
TypeScript

import { renderTabScreenContent } from "@/components/tab-screen-content"
import { Stack } from "expo-router"
import { ProfileHeaderButton } from "@/components/profile-header-button"
import {
inlineTitleOptions,
showHeaderProfile,
tabStackScreenTitles,
useStackScreenOptions,
} from "@/lib/navigation"
export const unstable_settings = {
anchor: "index",
}
export default function SearchLayout() {
const baseOptions = useStackScreenOptions({ title: "Search" })
return (
<Stack
screenLayout={renderTabScreenContent}
screenOptions={({ route }) => ({
...baseOptions,
...inlineTitleOptions,
title: tabStackScreenTitles[route.name] ?? "Search",
// iOS shows the profile button inline with the screen title instead.
headerRight: showHeaderProfile(route.name)
? () => <ProfileHeaderButton />
: undefined,
})}
/>
)
}