mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 15:59:40 +02:00
Move inactive projects out of active workspace: - bauntown (community website) - maerchenzauber (AI story generation) - memoro (voice memo app) - news (news aggregation) - nutriphi (nutrition tracking) - reader (reading app) - uload (URL shortener) - wisekeep (AI wisdom extraction) Update CLAUDE.md documentation: - Add presi to active projects - Document archived projects section - Update workspace configuration Archived apps can be re-activated by moving back to apps/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
63 lines
1.9 KiB
TypeScript
63 lines
1.9 KiB
TypeScript
import '../global.css';
|
|
|
|
import { Stack } from 'expo-router';
|
|
import { useDatabase } from '../hooks/useDatabase';
|
|
import { useTheme } from '../hooks/useTheme';
|
|
import { View, Text, ActivityIndicator, AppState } from 'react-native';
|
|
import { useEffect } from 'react';
|
|
import { PhotoService } from '../services/storage/PhotoService';
|
|
|
|
export const unstable_settings = {
|
|
// Ensure that reloading on `/modal` keeps a back button present.
|
|
initialRouteName: 'index',
|
|
};
|
|
|
|
export default function RootLayout() {
|
|
const { isReady, error } = useDatabase();
|
|
|
|
// Initialize theme on app start
|
|
useTheme();
|
|
|
|
// Clean up temporary photos when app comes to foreground
|
|
useEffect(() => {
|
|
const handleAppStateChange = async (nextAppState: string) => {
|
|
if (nextAppState === 'active') {
|
|
try {
|
|
const photoService = PhotoService.getInstance();
|
|
await photoService.cleanupTempPhotos();
|
|
console.log('Temporary photos cleaned up on app foreground');
|
|
} catch (error) {
|
|
console.warn('Failed to cleanup temp photos on foreground:', error);
|
|
}
|
|
}
|
|
};
|
|
|
|
const subscription = AppState.addEventListener('change', handleAppStateChange);
|
|
return () => subscription?.remove();
|
|
}, []);
|
|
|
|
if (!isReady) {
|
|
return (
|
|
<View className="flex-1 items-center justify-center bg-white">
|
|
{error ? (
|
|
<View className="items-center space-y-4">
|
|
<Text className="text-lg font-semibold text-red-500">Database Error</Text>
|
|
<Text className="px-4 text-center text-gray-600">{error}</Text>
|
|
</View>
|
|
) : (
|
|
<View className="items-center space-y-4">
|
|
<ActivityIndicator size="large" color="#6366f1" />
|
|
<Text className="text-gray-600">Initializing Nutriphi...</Text>
|
|
</View>
|
|
)}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<Stack>
|
|
<Stack.Screen name="index" options={{ headerShown: false }} />
|
|
<Stack.Screen name="modal" options={{ presentation: 'modal' }} />
|
|
</Stack>
|
|
);
|
|
}
|