:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import type { Href, ImperativeRouter } from 'expo-router'
import type { NavPin } from './navPinStore'
// Both navigators share the public list URLs. Explicit groups keep a pushed list from resolving to a hidden tab.
const TAB_HREFS: Record<NavPin, Href> = { errors: '/(tabs)/errors', replay: '/(tabs)/replay' }
const STACK_HREFS: Record<NavPin, Href> = { errors: '/(stack)/errors', replay: '/(stack)/replay' }
export function navTargetHref(pin: NavPin, pinned: boolean): Href {
return pinned ? TAB_HREFS[pin] : STACK_HREFS[pin]
}
export function openNavTarget(router: Pick<ImperativeRouter, 'push' | 'navigate'>, pin: NavPin, pinned: boolean): void {
if (pinned) {
router.navigate(TAB_HREFS[pin])
return
}
router.push(STACK_HREFS[pin])
}