Files
papryk-com/front/src/pages/Video.tsx
Patryk Koreń e7ec832f5b ldap
2026-07-02 23:55:40 +02:00

20 lines
496 B
TypeScript

import { apiFetch } from "@/api/auth";
import { useEffect, useState } from "react";
export function Video() {
const [video, setVideo] = useState<string | null>(null);
const getVideo = async () => {
const res = await apiFetch("/protected/video");
const txt = await res.text()
setVideo(txt)
}
useEffect(() => {
getVideo()
}, [])
return (
<div className="flex flex-1 flex-col gap-4 py-16">
{video}
</div>
);
}