import { useContext } from "react"; import { LiveContext } from "@contexts/live"; import { ILiveContext } from "../../../interfaces"; export const usePublish: () => NonNullable["publish"] = () => { const liveContext = useContext(LiveContext); return liveContext?.publish; };