Skip to content

Send files directly between devices over the internet - no cloud storage, no size limits.

351 B
Raw Blame
import type { ShowToastInput } from './ToastProvider'

type ToastPublisher = (input: ShowToastInput) => void

let publisher: ToastPublisher | null = null

export function setToastPublisher(next: ToastPublisher | null): void {
  publisher = next
}

export function pushToast(input: ShowToastInput): void {
  if (!publisher) return
  publisher(input)
}