import React, {useEffect, useState} from "react" import Layout from "../components/layout" import RepoCard from "../components/cards/repo" import bgImage from "../media/phones.png" const IndexPage = () => { const [repos, setRepos] = useState([]); useEffect(() => { fetch("https://raw.githubusercontent.com/recloudstream/cs-repos/master/repos-db.json") .then(r => r.json()) .then(data => { setRepos(data) }) }, [setRepos]) return
{repos && repos.map((it, index) => ) }
} export function Head() { return ( <> Cloudstream Repositories ) } export default IndexPage