Enable dark mode and fix theme

This commit is contained in:
Felix Malfait
2023-06-05 22:20:55 +02:00
parent 3ae6405f4d
commit 41fe78bc4c
17 changed files with 478 additions and 73 deletions

View File

@ -9,3 +9,7 @@ export const humanReadableDate = (date: Date) => {
export const getLogoUrlFromDomainName = (domainName?: string): string => {
return `https://api.faviconkit.com/${domainName}/144`;
};
export const browserPrefersDarkMode = (): boolean => {
return window.matchMedia('(prefers-color-scheme: dark)').matches;
};