w-lab-app/src/hooks/refill/useShowRefillModal.ts

15 lines
389 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client";
import { useSocketEmit } from "@/services/socket";
export const useShowRefillModal = () => {
const emit = useSocketEmit();
const showRefillModal = (chatId: string) => {
// Запрашиваем у сервера показать модальное окно пополнения
emit("request_refill_modal", { chatId });
};
return { showRefillModal };
};