Set up Expo SDK 56 project with TypeScript and Expo Router (file-based). Backend: - Full Convex schema (users, accounts, sessions, ads, categories, reviews, chats, messages, posts) deployed to self-hosted instance - Custom email/password auth with SHA-256 hashing via Convex actions - Query/mutation scaffolds for all domain tables - Convex environment variables configured on backend App structure: - Root layout with ConvexProvider, ThemeProvider, AuthContext - (auth) group: login and register screens (Macedonian UI) with role selection (handyman/customer) - (tabs) group: 5 tabs (Home, Explore, Posts, Chat, Profile) each with nested Stack layouts - Placeholder detail screens for ad, post, chat, review flows - 404 not-found screen in Macedonian UI primitives (components/ui/): - Button (4 variants), Input, Card, Loading, Avatar, Rating, Badge - ThemeProvider with light/dark palette via React context All user-facing strings in Macedonian. Code identifiers in English. TypeScript passes with zero errors.
57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
import { Tabs } from "expo-router";
|
|
import { useTheme } from "../../components/theme";
|
|
|
|
export default function TabLayout() {
|
|
const theme = useTheme();
|
|
|
|
return (
|
|
<Tabs
|
|
screenOptions={{
|
|
headerShown: false,
|
|
tabBarActiveTintColor: theme.colors.primary,
|
|
tabBarInactiveTintColor: theme.colors.textTertiary,
|
|
tabBarStyle: {
|
|
backgroundColor: theme.colors.card,
|
|
borderTopColor: theme.colors.border,
|
|
},
|
|
tabBarLabelStyle: { fontSize: 11 },
|
|
}}
|
|
>
|
|
<Tabs.Screen
|
|
name="(home)"
|
|
options={{
|
|
title: "Почетна",
|
|
tabBarIcon: ({ color, size }) => undefined,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="(explore)"
|
|
options={{
|
|
title: "Пребарување",
|
|
tabBarIcon: ({ color, size }) => undefined,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="(posts)"
|
|
options={{
|
|
title: "Побарувања",
|
|
tabBarIcon: ({ color, size }) => undefined,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="(chat)"
|
|
options={{
|
|
title: "Чат",
|
|
tabBarIcon: ({ color, size }) => undefined,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="(profile)"
|
|
options={{
|
|
title: "Профил",
|
|
tabBarIcon: ({ color, size }) => undefined,
|
|
}}
|
|
/>
|
|
</Tabs>
|
|
);
|
|
} |