// Version: 2026-02-15 /** * Main App Entry Point * Basic navigation setup */ import React, { useEffect, useState } from 'react'; import { StyleSheet, Text, View, ActivityIndicator } from 'react-native'; import { StatusBar } from 'expo-status-bar'; import { NavigationContainer } from '@react-navigation/native'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { initDatabase } from './src/services/database'; const Tab = createBottomTabNavigator(); // Placeholder screens const HomeScreen = () => ( 伝票履歴 販売アシスト1号 v2.0.0 React Native (Expo) 版 ); const CreateScreen = () => ( 新規作成 Coming Soon... ); const SettingsScreen = () => ( 設定・マスター管理 Coming Soon... ); export default function App() { const [isReady, setIsReady] = useState(false); useEffect(() => { const initialize = async () => { try { await initDatabase(); console.log('Database initialized successfully'); } catch (error) { console.error('Failed to initialize database:', error); } finally { setIsReady(true); } }; initialize(); }, []); if (!isReady) { return ( データベース初期化中... ); } return ( ); } const styles = StyleSheet.create({ loading: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, loadingText: { marginTop: 16, fontSize: 16, color: '#666', }, screen: { flex: 1, backgroundColor: '#f5f5f5', alignItems: 'center', justifyContent: 'center', padding: 20, }, title: { fontSize: 24, fontWeight: 'bold', marginBottom: 8, color: '#333', }, subtitle: { fontSize: 16, color: '#666', marginBottom: 4, }, info: { fontSize: 14, color: '#999', }, });