Download frontend/src/App.jsx from Rixhot/ZARAI: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/spaces/Rixhot/ZARAI/resolve/main/frontend/src/App.jsx
- Command line
-
hf download hf://spaces/Rixhot/ZARAI/frontend/src/App.jsx
-
curl -L -o App.jsx https://huggingface.co/spaces/Rixhot/ZARAI/resolve/main/frontend/src/App.jsx
1.2 kB
| /** | |
| * JARVIS — Root App Component | |
| * Sets up routing, error boundary, and keyboard shortcuts. | |
| */ | |
| import React, { useEffect } from 'react' | |
| import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom' | |
| import { AnimatePresence } from 'framer-motion' | |
| import AppLayout from './components/layout/AppLayout' | |
| import ChatPage from './components/chat/ChatPage' | |
| import ErrorBoundary from './components/layout/ErrorBoundary' | |
| import useAppStore from './stores/appStore' | |
| export default function App() { | |
| const { initializeSession } = useAppStore() | |
| useEffect(() => { | |
| // Initialize session + fetch health status on app load | |
| initializeSession() | |
| // Refresh health every 60 seconds | |
| const id = setInterval(initializeSession, 60_000) | |
| return () => clearInterval(id) | |
| }, []) | |
| return ( | |
| <ErrorBoundary> | |
| <BrowserRouter> | |
| <AnimatePresence mode="wait"> | |
| <Routes> | |
| <Route path="/" element={<AppLayout />}> | |
| <Route index element={<ChatPage />} /> | |
| <Route path="*" element={<Navigate to="/" replace />} /> | |
| </Route> | |
| </Routes> | |
| </AnimatePresence> | |
| </BrowserRouter> | |
| </ErrorBoundary> | |
| ) | |
| } | |