fix: DigitalOutputsVies.tsx

This commit is contained in:
ISA
2025-09-03 14:06:35 +02:00
parent a9ccdfc9ab
commit 2c92ca0866
8 changed files with 60 additions and 49 deletions

View File

@@ -18,6 +18,10 @@ const DigitalOutputsView: React.FC = () => {
const [isOutputModalOpen, setIsOutputModalOpen] = useState(false);
useEffect(() => {
// Fetch immediately on mount to ensure data is present without waiting for the first interval
dispatch(getDigitalOutputsThunk());
// Then continue polling periodically
const interval = setInterval(() => {
dispatch(getDigitalOutputsThunk());
}, 3000);