mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Remove client phoneConfig event (#73)
* Remove client phoneConfig event * Remove unused debug * Remove unused import * Remove unused import * Remove duplicated functions | fix useEffect dependency | etc * Fix warnings * Update phone/src/apps/twitter/components/TwitterApp.tsx Co-authored-by: Taso <[email protected]> Co-authored-by: Taso <[email protected]>
This commit is contained in:
1 parent
fdfd4133e2
commit
81f5e27064
12 files changed
+61
-81
No files matched your search
@@ -55,7 +55,7 @@ type AppsRepository = { preinstalled: IAppConfig[] };
|
||||
const AppWithStartup = ({ children, id }) => {
|
||||
useEffect(() => {
|
||||
Nui.send(`phone:app:${id}`);
|
||||
}, []);
|
||||
}, [id]);
|
||||
return children;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { phoneState } from './state';
|
||||
import { ServerConfig } from '../../../common/typings/config';
|
||||
import { IServerConfig } from '../../../common/typings/config';
|
||||
import ServerConfig from '../../../config.autogen.json';
|
||||
|
||||
interface IUsePhone {
|
||||
visibility: boolean;
|
||||
config?: ServerConfig;
|
||||
config?: IServerConfig;
|
||||
}
|
||||
|
||||
export const usePhone = (): IUsePhone => {
|
||||
const visibility = useRecoilValue(phoneState.visibility);
|
||||
const config = useRecoilValue(phoneState.phoneConfig);
|
||||
return { visibility, config };
|
||||
return { visibility, config: ServerConfig as any };
|
||||
};
|
||||
Reference in new issue
Block a user