// _app.js import { useEffect } from "react"; import { loadWindowVariables } from "../utils/loadWindowVariables"; import Header from "../components/Header"; import Navigation from "../components/Navigation"; import Footer from "../components/Footer"; import "../styles/globals.css"; import { Provider } from "react-redux"; import { setVariables } from "../store/variablesSlice"; import store from "../store/store"; function MyApp({ Component, pageProps }) { useEffect(() => { const loadAndStoreVariables = async () => { const variables = await loadWindowVariables(); store.dispatch(setVariables(variables)); // Speichere die geladenen Variablen im Redux Store }; if (typeof window !== "undefined") { loadAndStoreVariables(); } }, []); return (
); } export default MyApp;