34 lines
907 B
TypeScript
34 lines
907 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 HomeLayout() {
|
|
const baseOptions = useStackScreenOptions({ title: "Home" })
|
|
|
|
return (
|
|
<Stack
|
|
screenLayout={renderTabScreenContent}
|
|
screenOptions={({ route }) => ({
|
|
...baseOptions,
|
|
...inlineTitleOptions,
|
|
title: tabStackScreenTitles[route.name] ?? "Home",
|
|
// iOS shows the profile button inline with the screen title instead.
|
|
headerRight: showHeaderProfile(route.name)
|
|
? () => <ProfileHeaderButton />
|
|
: undefined,
|
|
})}
|
|
/>
|
|
)
|
|
}
|