anything-llm/frontend/src/hooks/usePrefersDarkMode.js
Timothy Carambat 91f5f94200
[FEATURE] Enable the ability to have multi user instances (#158)
* multi user wip

* WIP MUM features

* invitation mgmt

* suspend or unsuspend users

* workspace mangement

* manage chats

* manage chats

* add Support for admin system settings for users to delete workspaces and limit chats per user

* fix issue ith system var
update app to lazy load invite page

* cleanup and bug fixes

* wrong method

* update readme

* update readme

* update readme

* bump version to 0.1.0
2023-07-25 10:37:04 -07:00

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;
}