import Link from 'next/link'; import * as React from 'react'; import { Logo } from '@1milligram/design'; export const HeaderBlock = () => { const [totalStars, setTotalStars] = React.useState(0); React.useEffect(() => { fetch('https://api.github.com/repos/phuocng/csslayout') .then((res) => res.json()) .then((data) => setTotalStars(data.stargazers_count)) .catch(console.log); }, []); const HeaderLogo = React.forwardRef>( (props, ref) => ( ) ); return (
GitHub {totalStars}★
); };