I really hope I didnt fuck anything up now

This commit is contained in:
chip committed 2020-08-23 20:08:08 +02:00
1 parent ad20755608
commit ec37fcde46
67 files changed

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
{
"4gNetowrk": "AT&T",
"language": "en_US",
"wallpapers": ["default.png", "dragon.jpg", "legacy.jpg"],
"frames": ["default.png", "s10.png"],
"themes": {
"default-dark": {
"palette": {
"type": "dark"
}
},
"default-light": {
"palette": {
"type": "light"
}
}
}
}
+20
View File
@@ -0,0 +1,20 @@
import Default from "../default.json";
import { atom, useRecoilState } from "recoil";
const configState = atom({
key: 'config',
default: Default
})
export const useConfig = (state = configState) => {
const [config, _setConfig] = useRecoilState(state)
const setConfig = (key, value) => {
_setConfig(oldConfig => ({
...oldConfig,
[key]: value
}));
};
return [config, setConfig];
};