mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-09-11 23:03:25 +02:00
10 lines
211 B
JavaScript
10 lines
211 B
JavaScript
|
export default function usePrefersDarkMode() {
|
||
|
if (window?.matchMedia) {
|
||
|
if (window?.matchMedia("(prefers-color-scheme: dark)")?.matches) {
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
return false;
|
||
|
}
|