import { Alert } from 'react-bootstrap' import YouTube from '../svgs/youtube-line.svg' import { useEffect, useState } from 'react' import { gql, useQuery } from '@apollo/client' export default function Snl () { const [show, setShow] = useState() const { data } = useQuery(gql`{ snl }`, { fetchPolicy: 'cache-and-network' }) useEffect(() => { const dismissed = localStorage.getItem('snl') if (dismissed && dismissed > new Date(dismissed) < new Date(new Date().setDate(new Date().getDate() - 6))) { return } if (data?.snl) { setShow(true) } }, [data]) if (!show) return null return (