0b2d65a4e9
Mobile app detects SSO per server, supports OAuth sign-in, and preserves saved sessions when adding accounts. Tab screens get proper chrome layout and tab-bar clearance with scrollable page headers. Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
831 B
TypeScript
36 lines
831 B
TypeScript
import type { ReactNode } from "react";
|
|
import { StyleSheet, View } from "react-native";
|
|
import { StatusBar } from "expo-status-bar";
|
|
|
|
import { TopChromeBar } from "@/components/TopChromeBar";
|
|
import { useAppTheme } from "@/contexts/ThemeContext";
|
|
|
|
type TabPageProps = {
|
|
children: ReactNode;
|
|
};
|
|
|
|
/** Tab root — pinned top chrome, scrollable body below. */
|
|
export function TabPage({ children }: TabPageProps) {
|
|
const { isDark } = useAppTheme();
|
|
|
|
return (
|
|
<View style={styles.root}>
|
|
<StatusBar style={isDark ? "light" : "dark"} />
|
|
<TopChromeBar />
|
|
<View style={styles.content}>{children}</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
root: {
|
|
flex: 1,
|
|
backgroundColor: "transparent",
|
|
},
|
|
content: {
|
|
flex: 1,
|
|
minHeight: 0,
|
|
backgroundColor: "transparent",
|
|
},
|
|
});
|