WIP: analoge Eingänge von Slice bekommen
This commit is contained in:
@@ -11,16 +11,14 @@ export default function AnalogeEingaengeTable() {
|
||||
(state: RootState) => state.analogeEingaenge
|
||||
);
|
||||
|
||||
console.log("Aktuelle Redux-Daten:", analogeEingaenge); // 🔍 Prüfen, ob Redux wirklich aktualisiert wird
|
||||
|
||||
return (
|
||||
<div className="w-full">
|
||||
{/* Card Container */}
|
||||
<div className="bg-white shadow-lg rounded-lg p-4 border border-gray-200">
|
||||
{/* Card Title */}
|
||||
<h2 className="text-lg md:text-xl font-semibold mb-4 text-gray-700">
|
||||
Analoge Eingänge
|
||||
</h2>
|
||||
|
||||
{/* Tabelle in einem Scroll-Container für kleine Screens */}
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full border-collapse border border-gray-300 text-sm md:text-base">
|
||||
<thead>
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from "../../../../redux/slices/analogeEingaengeSlice";
|
||||
|
||||
export const useFetchAnalogeEingaenge = () => {
|
||||
const dispatch = useAppDispatch(); // ✅ Verwende die App-Dispatch-Funktion
|
||||
const dispatch = useAppDispatch(); // ✅ Verwende typisierten Dispatch
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(loadFromWindow()); // Initial Mock-Daten aus `window` laden
|
||||
|
||||
Reference in New Issue
Block a user