({ initialTestimonials, talks })
| 21 | }; |
| 22 | |
| 23 | const Talks: FC<Props> = ({ initialTestimonials, talks }) => { |
| 24 | const [testimonials, setTestimonials] = useState(initialTestimonials); |
| 25 | const $end = useRef<HTMLDivElement>(null); |
| 26 | |
| 27 | useEffect(() => { |
| 28 | if (!$end.current) { |
| 29 | return; |
| 30 | } |
| 31 | |
| 32 | const onIntersect: IntersectionObserverCallback = e => { |
| 33 | if (e[0].isIntersecting) { |
| 34 | fetch(`/api/testimonials?from=${testimonials.length}`) |
| 35 | .then(r => r.json()) |
| 36 | .then(d => setTestimonials([...testimonials, ...d])); |
| 37 | } |
| 38 | }; |
| 39 | const observer = new IntersectionObserver(onIntersect); |
| 40 | observer.observe($end.current); |
| 41 | |
| 42 | return () => observer.disconnect(); |
| 43 | }, [testimonials.length]); |
| 44 | |
| 45 | return ( |
| 46 | <div className={styles.talks}> |
| 47 | <Head> |
| 48 | <meta name="twitter:card" content="summary_large_image" /> |
| 49 | <meta name="twitter:site" content="@tejaskumar_" /> |
| 50 | <meta name="twitter:creator" content="@tejaskumar_" /> |
| 51 | <meta name="twitter:title" content="Talks by Tejas Kumar" /> |
| 52 | <meta |
| 53 | name="twitter:description" |
| 54 | content="An aggregation of all of Tejas' talks and feedback about them." |
| 55 | /> |
| 56 | <meta name="og:title" content="Talks by Tejas Kumar" /> |
| 57 | <meta |
| 58 | name="og:description" |
| 59 | content="An aggregation of all of Tejas' talks and feedback about them." |
| 60 | /> |
| 61 | <meta |
| 62 | property="og:image" |
| 63 | content="https://tej.as/img/talks-og-image.jpg" |
| 64 | /> |
| 65 | <meta |
| 66 | property="twitter:image" |
| 67 | content="https://tej.as/img/talks-og-image.jpg" |
| 68 | /> |
| 69 | <title>Talks : Tejas Kumar | Speaker, Engineer, JavaScript, Love</title> |
| 70 | <link rel="canonical" href="https://tej.as/talks"></link> |
| 71 | <meta |
| 72 | name="description" |
| 73 | content="An aggregation of all of Tejas' talks and feedback about them." |
| 74 | /> |
| 75 | </Head> |
| 76 | <Title length={50}>Talks</Title> |
| 77 | <h2> |
| 78 | So far, I've spoken at{" "} |
| 79 | <strong> |
| 80 | {talks.length} conferences, meetups, and podcasts over 10 years |
nothing calls this directly
no outgoing calls
no test coverage detected