Insole-production time tracker exported from the Create/Anything AI platform. Baseline snapshot before any reverse-engineering or cleanup. - apps/mobile: Expo Router app (iOS/Android/web), the only workspace - publisher/: standalone OpenNext/AWS deploy tooling for the web side - Backend (/api/tasks, /api/logs + DB) lives remotely, not in this repo
25 lines
771 B
TypeScript
25 lines
771 B
TypeScript
import { Tabs as ExpoTabs } from 'expo-router/build/layouts/Tabs';
|
|
import { merge } from 'lodash';
|
|
import { forwardRef } from 'react';
|
|
import { Platform } from 'react-native';
|
|
export const BASE_TAB_BAR_HEIGHT = Platform.OS === 'ios' ? 49 : 56;
|
|
|
|
export const Tabs = forwardRef((props: any, ref: any) => {
|
|
const isInIframe = typeof window !== 'undefined' ? window.self !== window.top : false;
|
|
const height = props.screenOptions.tabBarStyle?.height || (BASE_TAB_BAR_HEIGHT + (isInIframe ? 34 : 0));
|
|
|
|
return (
|
|
<ExpoTabs
|
|
{...props}
|
|
screenOptions={merge(props.screenOptions, {
|
|
tabBarStyle: merge(props.screenOptions.tabBarStyle, { height }),
|
|
})}
|
|
ref={ref}
|
|
/>
|
|
);
|
|
});
|
|
|
|
(Tabs as any).Screen = ExpoTabs.Screen;
|
|
|
|
export default Tabs;
|