init
This commit is contained in:
commit
04267b3886
100 changed files with 16495 additions and 0 deletions
27
frontend/src/pages/Index.tsx
Normal file
27
frontend/src/pages/Index.tsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
import { useState, useEffect } from 'react';
|
||||
import { LoginForm } from '@/components/LoginForm';
|
||||
import { InventoryDashboard } from '@/components/InventoryDashboard';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
|
||||
const Index = () => {
|
||||
const { user, loading } = useAuth();
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-slate-50">
|
||||
<div className="animate-pulse">
|
||||
<div className="w-8 h-8 bg-blue-600 rounded-full"></div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
return <LoginForm />;
|
||||
}
|
||||
|
||||
return <InventoryDashboard />;
|
||||
};
|
||||
|
||||
export default Index;
|
Loading…
Add table
Add a link
Reference in a new issue