import { useState, useEffect } from 'react'
import BadgeExamples from '../components/badge-examples'
import BadgenTitle from '../components/badgen-title'
import TopBar from '../components/top-bar'
import Intro from '../components/home-intro'
import Footer from '../components/footer'
import examples from '../static/.meta/badges.json'
const Index = () => {
const [tab, setTab] = useState('live')
const [host, setHost] = useState()
const badges = examples[tab]
useEffect(() => {
const forceHost = new URL(window.location.href).searchParams.get('host')
setHost((forceHost || window.location.origin) + '/')
})
return <>