Fix onboarding gate + tab icons + trim New-card screen
- Onboarding gate: the `hydrated` flag never flipped (onRehydrateStorage hit the store const during synchronous MMKV hydration), leaving a blank null gate. Dropped the flag; gate directly on `onboarded` (MMKV hydrates synchronously). - Tab bar: removed the item padding that clipped the icons; clean taller bar with safe-area bottom padding. - New-card screen: header title "Make your card" (centered), removed the body heading and all the detail fields + back-of-card links (captured in onboarding) and the Publish button (returns later on the flipped card). Keeps Take/Choose photo + AI scene/video + Save. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
8865dc9683
commit
e77e812609
@@ -19,12 +19,10 @@ function tabIcon(name: IconName) {
|
||||
|
||||
export default function TabsLayout() {
|
||||
const insets = useSafeAreaInsets();
|
||||
const hydrated = useProfileStore((s) => s.hydrated);
|
||||
const onboarded = useProfileStore((s) => s.onboarded);
|
||||
|
||||
// Wait for MMKV to rehydrate before deciding, then send first-run users to
|
||||
// onboarding (avoids a flash of the tabs).
|
||||
if (!hydrated) return null;
|
||||
// First-run users go to onboarding (MMKV hydrates synchronously, so this is
|
||||
// correct on the first render — no flash).
|
||||
if (!onboarded) return <Redirect href="/onboarding" />;
|
||||
|
||||
return (
|
||||
@@ -38,11 +36,10 @@ export default function TabsLayout() {
|
||||
borderTopWidth: StyleSheet.hairlineWidth,
|
||||
borderTopColor: "#1c1c22",
|
||||
height: 64 + insets.bottom,
|
||||
paddingTop: 10,
|
||||
paddingBottom: Math.max(insets.bottom, 14),
|
||||
paddingTop: 8,
|
||||
paddingBottom: insets.bottom + 10,
|
||||
},
|
||||
tabBarLabelStyle: { fontSize: 11, fontWeight: "600", marginBottom: 2 },
|
||||
tabBarItemStyle: { paddingVertical: 4 },
|
||||
}}
|
||||
>
|
||||
<Tabs.Screen name="index" options={{ title: "Cards", tabBarIcon: tabIcon("bag-personal") }} />
|
||||
|
||||
Reference in New Issue
Block a user