mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
refactor(events): Events are now tied to a common enum typings (#167)
* chore(scripts/twitter): Refactored twitter to use event enums * chore(scripts/marketplace): Refactored marketplace to use event enums * chore(scripts/messages): Refactored messages to use event enums * chore(scripts/contacts): Refactored contacts to use event enums * chore(scripts/calls): Refactored calls to use event enums * chore(scripts/notes): Refactored notes to use event enums * chore(scripts/photos): Refactored photos to use event enums * chore(scripts/bank): Refactored bank to use event enums * chore(scripts/phone): Refactored phone to use event enums * chore(events): Removed old events object * refactor(phone/nui-events): Attached NUI events to respective enum * tweak(event-enums): Added npwd prefix to all events * tweak(phone/serve): Added craco to override CRA without eject Also bumped react-scripts to 4.0.1, with seemingly no issues * fix(typings/twitter): Fixed method enums for twitter
This commit is contained in:
62 files changed
+4734
-3470
No files matched your search
@@ -10,6 +10,7 @@ import { useHistory, useLocation } from 'react-router-dom';
|
||||
import { ContextMenu } from '../../../../ui/components/ContextMenu';
|
||||
import { deleteQueryFromLocation } from '../../../../common/utils/deleteQueryFromLocation';
|
||||
import { PictureResponsive } from '../../../../ui/components/PictureResponsive';
|
||||
import { MessageEvents } from '../../../../../../typings/messages';
|
||||
|
||||
interface IProps {
|
||||
isOpen: boolean;
|
||||
@@ -34,7 +35,7 @@ export const MessageImageModal = ({ isOpen, messageGroupId, onClose, image }: IP
|
||||
|
||||
const sendImageMessage = useCallback(
|
||||
(m) => {
|
||||
Nui.send('phone:sendMessage', {
|
||||
Nui.send(MessageEvents.SEND_MESSAGE, {
|
||||
groupId: messageGroupId,
|
||||
message: m,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user