export async function initCssVars()

in space-slack-sync/client/src/app/service/theme.ts [6:17]


export async function initCssVars() {
    // subscribe to the changes in theme css variables
    window.addEventListener("message", (e) => {
        if (e.data.properties !== undefined && e.data.type == `ThemeProperties`) {
            const themeProperties: ThemeProperties = e.data;
            applyCssVars(themeProperties);
        }
    });

    const themeCssVars = await getCssVarsAndSubscribeForChanges();
    applyCssVars(themeCssVars);
}