test communication scheduler<->simclient

This commit is contained in:
2025-07-18 14:49:53 +00:00
parent a1d6d83488
commit 2e9f22f5cc
11 changed files with 389 additions and 88 deletions

View File

@@ -32,7 +32,6 @@ const sidebarItems = [
import { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { fetchClientsWithoutDescription } from './apiClients';
// ENV aus .env holen (Platzhalter, im echten Projekt über process.env oder API)
const ENV = import.meta.env.VITE_ENV || 'development';
@@ -128,7 +127,6 @@ const Layout: React.FC = () => {
);
};
function useLoginCheck() {
const [isLoggedIn, setIsLoggedIn] = useState(false);
@@ -150,17 +148,7 @@ const App: React.FC = () => {
const navigate = useNavigate();
const isLoggedIn = useLoginCheck();
useEffect(() => {
if (!isLoggedIn) return;
fetchClientsWithoutDescription().then(list => {
if (list.length > 0) {
console.log('[Navigation] Weiterleitung zu /clients wegen fehlender Beschreibung');
navigate('/clients');
} else {
console.log('[Navigation] Dashboard wird angezeigt, alle Clients haben Beschreibung');
}
});
}, [isLoggedIn, navigate]);
// Automatische Navigation zu /clients bei leerer Beschreibung entfernt
return (
<ToastProvider>