mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
refactor(client/interface): default notify backwards compat
This commit is contained in:
@@ -4,7 +4,7 @@ import { debugData } from '../../../utils/debugData';
|
||||
export const debugCustomNotification = () => {
|
||||
debugData<CustomNotificationProps>([
|
||||
{
|
||||
action: 'customNotify',
|
||||
action: 'notify',
|
||||
data: {
|
||||
title: 'Success',
|
||||
description: 'Notification description',
|
||||
@@ -14,7 +14,7 @@ export const debugCustomNotification = () => {
|
||||
]);
|
||||
debugData<CustomNotificationProps>([
|
||||
{
|
||||
action: 'customNotify',
|
||||
action: 'notify',
|
||||
data: {
|
||||
title: 'Info',
|
||||
description: 'Notification description',
|
||||
@@ -24,7 +24,7 @@ export const debugCustomNotification = () => {
|
||||
]);
|
||||
debugData<CustomNotificationProps>([
|
||||
{
|
||||
action: 'customNotify',
|
||||
action: 'notify',
|
||||
data: {
|
||||
title: 'Error',
|
||||
description: 'Notification description',
|
||||
@@ -34,7 +34,7 @@ export const debugCustomNotification = () => {
|
||||
]);
|
||||
debugData<CustomNotificationProps>([
|
||||
{
|
||||
action: 'customNotify',
|
||||
action: 'notify',
|
||||
data: {
|
||||
title: 'Custom icon success',
|
||||
description: 'Notification description',
|
||||
|
||||
@@ -119,7 +119,7 @@ const exitAnimationBottom = keyframes({
|
||||
const Notifications: React.FC = () => {
|
||||
const { classes } = useStyles();
|
||||
|
||||
useNuiEvent<CustomNotificationProps>('customNotify', (data) => {
|
||||
useNuiEvent<CustomNotificationProps>('notify', (data) => {
|
||||
if (!data.title && !data.description) return;
|
||||
// Backwards compat with old notifications
|
||||
let position = data.position;
|
||||
|
||||
Reference in New Issue
Block a user