5180 fichiers 38.5 Mo 0 téléchargements 224 vues mis à jour il y a 5 heures ui
nitro-v36-with-renderer-v36 / src / hooks / notification / useRecyclerNotifications.ts
useRecyclerNotifications.ts 928 o Télécharger le fichier
import { RecyclerFinishedMessageEvent } from '@octane/renderer';
import { NotificationBubbleType } from '../../api';
import { localizeWithFallback } from '../../api/utils/localizeWithFallback';
import { useMessageEvent } from '../events';

type ShowSingleBubble = (message: string, type: string, imageUrl?: string) => void;

/** AIR HabboNotifications.onRecyclerFinished: a "recycle ok" bubble when the Furnimatic gave a prize. */
export const useRecyclerNotifications = (showSingleBubble: ShowSingleBubble) => {
    useMessageEvent<RecyclerFinishedMessageEvent>(RecyclerFinishedMessageEvent, (event) => {
        if (event.getParser()?.recyclerFinishedStatus !== RecyclerFinishedMessageEvent.FINISHED_OK) return;

        showSingleBubble(
            localizeWithFallback('notifications.text.recycle.ok', 'Recycling done! Your prize is in your inventory.'),
            NotificationBubbleType.RECYCLEROK
        );
    });
};
15Sujets
1Dépôts
20Membres
2En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser