kintex/mobile/app/(tabs)/_layout.tsx
zio 490b723a45 chore(mobile): v0.2.0 source snapshot for reproducibility
- app.json: version 0.2.0 / versionCode 2, drop expo-screen-capture plugin
- add lib/i18n (ko/en/ja/zh), lib/roleTrack, LanguageContext + LanguageSelector
- profile/security hardening across screens (login/register/forgot/profile/tabs)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 00:29:38 +09:00

62 lines
1.9 KiB
TypeScript

/*
* 하단 탭 바 4개 — 홈 / 현장 / 갤러리 / 더보기 (design.md §2-2 모바일).
* 현장 탭은 역할에 따라 체크리스트(장치업체)·검수(홀매니저)로 진입.
*/
import { Ionicons } from '@expo/vector-icons';
import { Redirect, Tabs } from 'expo-router';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useAuth } from '../../context/AuthContext';
import { colors } from '../../theme';
export default function TabsLayout() {
const { t } = useTranslation();
const { ready, token } = useAuth();
if (ready && !token) return <Redirect href="/login" />;
return (
<Tabs
screenOptions={{
tabBarActiveTintColor: colors.primary600,
tabBarInactiveTintColor: colors.neutral500,
headerStyle: { backgroundColor: colors.white },
headerTitleStyle: { fontWeight: '600', color: colors.neutral900 },
tabBarStyle: { borderTopColor: colors.neutral200 },
}}
>
<Tabs.Screen
name="index"
options={{
title: t('nav.tabHome'),
tabBarIcon: ({ color, size }) => <Ionicons name="home-outline" color={color} size={size} />,
}}
/>
<Tabs.Screen
name="field"
options={{
title: t('nav.tabField'),
tabBarIcon: ({ color, size }) => (
<Ionicons name="clipboard-outline" color={color} size={size} />
),
}}
/>
<Tabs.Screen
name="gallery"
options={{
title: t('nav.tabGallery'),
tabBarIcon: ({ color, size }) => <Ionicons name="images-outline" color={color} size={size} />,
}}
/>
<Tabs.Screen
name="more"
options={{
title: t('nav.tabMore'),
tabBarIcon: ({ color, size }) => (
<Ionicons name="ellipsis-horizontal" color={color} size={size} />
),
}}
/>
</Tabs>
);
}