mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Merge branch 'master' into feat/snackbar-provider
This commit is contained in:
39 files changed
+926
-904
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;
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
export default {
|
||||
async send(event: any, data = {}) {
|
||||
/* eslint-disable no-unreachable */
|
||||
return fetch(`http://new-phone-who-dis/${event}`, {
|
||||
return fetch(`https://new-phone-who-dis/${event}`, {
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
|
||||
@@ -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