import React, { ReactElement } from 'react' import ReactDOM from 'react-dom' import { graphql, useStaticQuery } from 'gatsby' import PostTeaser from '../PostTeaser' import SearchResultsEmpty from './SearchResultsEmpty' import { searchResults, results as styleResults } from './SearchResults.module.css' import { Post } from '../../../@types/Post' export interface Results { slug: string } const query = graphql` query { allMarkdownRemark { edges { node { ...PostTeaser } } } } ` function SearchResultsPure({ searchQuery, results, toggleSearch, posts }: { posts: [{ node: Post }] searchQuery: string results: Results[] toggleSearch(): void }) { return (