import { useEffect, useState } from 'react' import { Box, Flex, Grid, Text } from 'theme-ui' import CardModel from './card-model' import Buttons from './button' /** @jsxImportSource theme-ui */ export default function Onboard({ stars }) { const [projects, setProjects] = useState(0) useEffect(() => { fetch( 'https://api.github.com/search/issues?q=repo:hackclub/onboard+is:pr+is:merged+label:Submission' ) .then(response => response.json()) .then(data => setProjects(data.total_count)) }, []) return ( OnBoard {projects} projects built Circuit boards are magical. You design one, we'll print it. Completely for free! Get a $100 grant to fuel the creation of your dream project with OnBoard. Get a grant Learn how to design a PCB See what other hackers have built ) }