mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 06:42:03 +00:00
- Rename App.tsx to app.tsx (kebab-case naming convention) - Add barrel exports (index.ts) for src/hooks/ - Add barrel exports (index.ts) for src/components/dialogs/ - Add barrel exports (index.ts) for src/components/layout/ - Update renderer.tsx import to use lowercase app.tsx This is Phase 1 of folder-pattern.md compliance: establishing proper file naming conventions and barrel export patterns. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import { useState, useCallback } from 'react';
|
|
import { RouterProvider } from '@tanstack/react-router';
|
|
import { router } from './utils/router';
|
|
import { SplashScreen } from './components/splash-screen';
|
|
import { useSettingsMigration } from './hooks/use-settings-migration';
|
|
import './styles/global.css';
|
|
import './styles/theme-imports';
|
|
|
|
export default function App() {
|
|
const [showSplash, setShowSplash] = useState(() => {
|
|
// Only show splash once per session
|
|
if (sessionStorage.getItem('automaker-splash-shown')) {
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|
|
|
|
// Run settings migration on startup (localStorage -> file storage)
|
|
const migrationState = useSettingsMigration();
|
|
if (migrationState.migrated) {
|
|
console.log('[App] Settings migrated to file storage');
|
|
}
|
|
|
|
const handleSplashComplete = useCallback(() => {
|
|
sessionStorage.setItem('automaker-splash-shown', 'true');
|
|
setShowSplash(false);
|
|
}, []);
|
|
|
|
return (
|
|
<>
|
|
<RouterProvider router={router} />
|
|
{showSplash && <SplashScreen onComplete={handleSplashComplete} />}
|
|
</>
|
|
);
|
|
}
|