fix(site): fix favicon theme (#10497)

This commit is contained in:
Bruno Quaresma
2023-11-02 15:51:39 -03:00
committed by GitHub
parent 921b6eb4ee
commit d2b8a93638

View File

@ -103,9 +103,10 @@ export const WorkspaceReadyPage = ({
if (typeof window === "undefined" || !window.matchMedia) {
return;
}
const isDark = window.matchMedia("(prefers-color-scheme: dark)");
// We want the favicon the opposite of the theme.
setFaviconTheme(isDark ? "light" : "dark");
setFaviconTheme(isDark.matches ? "light" : "dark");
}, []);
const buildLogs = useWorkspaceBuildLogs(workspace.latest_build.id);
const shouldDisplayBuildLogs =