mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Fix: Workaround for ESX errors pertaining to player loading (#153)
* Set phone ready before sending any init events + Show initializing phone message if not ready yet * Send phone ready to nui
This commit is contained in:
1 parent
6e72e2c50e
commit
1a09fa57ae
7 files changed
+76
-31
No files matched your search
@@ -4,8 +4,7 @@ import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
|
||||
import { IAlert, useSnackbar } from '../../../ui/hooks/useSnackbar';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useMessageNotifications } from './useMessageNotifications';
|
||||
import { useCallback, useEffect } from 'react';
|
||||
import Nui from '../../../os/nui-events/utils/Nui';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
export const useMessagesService = () => {
|
||||
const setMessageGroups = useSetRecoilState(messageState.messageGroups);
|
||||
@@ -15,10 +14,6 @@ export const useMessagesService = () => {
|
||||
const { setNotification } = useMessageNotifications();
|
||||
const { t } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
Nui.send('phone:fetchMessageGroups');
|
||||
}, []);
|
||||
|
||||
const handleAddAlert = useCallback(
|
||||
({ message, type }: IAlert) => {
|
||||
addAlert({
|
||||
|
||||
Reference in new issue
Block a user