import VideoCard from "../components/video/VideoCard"; import {useEffect, useState} from "react"; import { getClips } from "../utils/endpoints"; import type { Clip } from "../utils/types"; const MyClips = () => { const [clips, setClips] = useState([]); const [error, setError] = useState(null); useEffect(() => { getClips() .then((data) => setClips(data)) .catch((err) => setError(err)); }, []); return (

My Clips

{clips.map((clip) => ( ))}
{clips.length === 0 && !error && (

No clips yet.

Upload your first clip to get started.

)} {error &&

{error.toString()}

}
); } export default MyClips;