import React, { useEffect, useState } from "react"; import Container from "../../components/Container"; import Timeline, { TimelineUnits } from "../../components/Timeline"; type LiveInfo = | { live: false; } | { live: true; videoID: string; }; const Live: React.FunctionComponent = () => { const [tl, setTl] = useState([]); const [liveInfo, setLiveInfo] = useState({ live: false }); useEffect(() => { fetch("/data/timeline.json") .then(res => res.json()) .then(setTl) .catch(() => {}); fetch("https://api.mkr.pw/live") .then(res => res.json()) .then(setLiveInfo) .catch(() => {}); }, []); return (

MKRhere

); }; export default Live;