Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(site): fix favicon theme
  • Loading branch information
BrunoQuaresma committed Nov 2, 2023
commit ba1baa43e90a3c22a11aaccf0085f6020a3b9315
5 changes: 3 additions & 2 deletions site/src/pages/WorkspacePage/WorkspaceReadyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ export const WorkspaceReadyPage = ({
if (typeof window === "undefined" || !window.matchMedia) {
return;
}
const isDark = window.matchMedia("(prefers-color-scheme: dark)");

const matchResult = window.matchMedia("(prefers-color-scheme: dark)");
// We want the favicon the opposite of the theme.
setFaviconTheme(isDark ? "light" : "dark");
setFaviconTheme(matchResult.matches ? "light" : "dark");
}, []);
const buildLogs = useWorkspaceBuildLogs(workspace.latest_build.id);
const shouldDisplayBuildLogs =
Expand Down