mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
tweak(config): Config var & send as event method
config -> ResourceConfig for readability and the resource config in NUI is now being referenced consistently from state so it can be referenced at runtime and not compile time. Also removes the need to copy the config before using `cp`
This commit is contained in:
1 parent
8ce6ec7559
commit
dd3eac4a0e
18 files changed
+66
-89
No files matched your search
@@ -6,7 +6,10 @@ const configState = atom({
|
||||
default: Default,
|
||||
});
|
||||
|
||||
export const useConfig = (state: any = configState): any => {
|
||||
// This is NOT the resource config but instead the NUI specific config,
|
||||
// this means that if there are changs to the config in `../default.json`,
|
||||
// it will require a rebuild for those to take effect.
|
||||
export const usePhoneConfig = (state: any = configState): any => {
|
||||
const [config, _setConfig] = useRecoilState(state);
|
||||
|
||||
const setConfig = (key, value) => {
|
||||
|
||||
Reference in new issue
Block a user