tweak(phone/messages): Improve transition to MessageModal (conversation) (#140)

This commit is contained in:
J Francisco Rader authored and GitHub committed 2021-03-06 02:10:13 -05:00
1 parent 0c602f1767
commit 08d2de2dc7
2 files changed
+20 -4

No files matched your search

@@ -4,7 +4,8 @@ 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 } from 'react';
import { useCallback, useEffect } from 'react';
import Nui from '../../../os/nui-events/utils/Nui';
export const useMessagesService = () => {
const setMessageGroups = useSetRecoilState(messageState.messageGroups);
@@ -14,6 +15,10 @@ export const useMessagesService = () => {
const { setNotification } = useMessageNotifications();
const { t } = useTranslation();
useEffect(() => {
Nui.send('phone:fetchMessageGroups');
}, []);
const handleAddAlert = useCallback(
({ message, type }: IAlert) => {
addAlert({