mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
working typescript version
This commit is contained in:
1 parent
581d6011e0
commit
cff746aa38
119 files changed
+247
-189
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import Default from "../default.json";
|
||||
import { useConfig } from "../../../config/hooks/useConfig";
|
||||
import { atom } from "recoil";
|
||||
import { createMuiTheme } from "@material-ui/core";
|
||||
|
||||
const settingsState = atom({
|
||||
key: "settings",
|
||||
default: Default,
|
||||
});
|
||||
|
||||
export const useSettings = () => {
|
||||
const [settings, setSettings] = useConfig(settingsState);
|
||||
const [config] = useConfig();
|
||||
const currentTheme = () => createMuiTheme(config.themes[settings.theme]);
|
||||
return { settings, setSettings, currentTheme };
|
||||
};
|
||||
Reference in new issue
Block a user