From 141364e3b588ffb3797c3543f0e9593c2260f624 Mon Sep 17 00:00:00 2001 From: toir-bot Date: Mon, 13 Apr 2026 18:31:56 +0000 Subject: [PATCH] feat: add generated code: frontend/src/App.tsx --- frontend/src/App.tsx | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 frontend/src/App.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx new file mode 100644 index 0000000..6d7abbd --- /dev/null +++ b/frontend/src/App.tsx @@ -0,0 +1,44 @@ +import { Admin, Resource } from 'react-admin'; +import { authProvider, initKeycloak } from './authProvider'; +import { dataProvider } from './dataProvider'; +import { EquipmentList, EquipmentEdit, EquipmentCreate, EquipmentShow } from './resources/equipment'; +import { ChangeEquipmentStatusList, ChangeEquipmentStatusEdit, ChangeEquipmentStatusCreate, ChangeEquipmentStatusShow } from './resources/change-equipment-status'; +import { useState, useEffect } from 'react'; +import { Loading } from 'react-admin'; + +const App = () => { + const [isAuthenticated, setIsAuthenticated] = useState(false); + + useEffect(() => { + const initializeAuth = async () => { + const authResult = await initKeycloak(); + setIsAuthenticated(authResult); + }; + initializeAuth(); + }, []); + + if (!isAuthenticated) { + return ; + } + + return ( + + + + + ); +}; + +export default App; \ No newline at end of file