import { IconPatch } from "@/components/buttons/IconPatch"; import { Icons } from "@/components/Icon"; import { Title } from "@/components/text/Title"; import { useVideoPlayerDescriptor } from "@/video/state/hooks"; import { useError } from "@/video/state/logic/error"; import { useMeta } from "@/video/state/logic/meta"; import { ReactNode } from "react"; import { VideoPlayerHeader } from "./VideoPlayerHeader"; interface VideoPlayerErrorProps { onGoBack?: () => void; children?: ReactNode; } export function VideoPlayerError(props: VideoPlayerErrorProps) { const descriptor = useVideoPlayerDescriptor(); const meta = useMeta(descriptor); const errorData = useError(descriptor); const err = errorData.error; if (!err) return props.children as any; return (
{err?.name}: {err?.description}