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:
J Francisco RaderandTaso authored and GitHub committed 2021-02-10 12:04:28 -05:00
1 parent fdfd4133e2
commit 81f5e27064
12 files changed
+61 -81

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ type AppsRepository = { preinstalled: IAppConfig[] };
const AppWithStartup = ({ children, id }) => {
useEffect(() => {
Nui.send(`phone:app:${id}`);
}, []);
}, [id]);
return children;
};
+4 -4
View File
@@ -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 };
};