Header,Footer und dashboard bekommen Daten von IndexedDB statt von Window Objekt
This commit is contained in:
@@ -9,10 +9,19 @@ import "../styles/globals.css";
|
||||
function MyApp({ Component, pageProps }) {
|
||||
useEffect(() => {
|
||||
if (typeof window !== "undefined") {
|
||||
const initializeDatabase = async () => {
|
||||
try {
|
||||
await loadWindowVariables();
|
||||
console.log("IndexedDB initialisiert.");
|
||||
} catch (error) {
|
||||
console.error("Fehler bei der Initialisierung der IndexedDB:", error);
|
||||
}
|
||||
};
|
||||
|
||||
initializeDatabase();
|
||||
setInterval(() => {
|
||||
loadWindowVariables();
|
||||
}, 10000);
|
||||
loadWindowVariables();
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user