import React, { ReactElement } from 'react' import { graphql, PageProps } from 'gatsby' import Page from '../components/templates/Page' import Tag from '../components/atoms/Tag' import { tags } from './tags.module.css' const page = { frontmatter: { title: 'Tags', description: 'All the tags being used.' } } interface Tag { fieldValue: string totalCount: number } interface TagsPageProps extends PageProps { data: { allMarkdownRemark: { group: Tag[] } } } const TagsPage = (props: TagsPageProps): ReactElement => ( ) export default TagsPage export const tagsPageQuery = graphql` { allMarkdownRemark { group(field: { frontmatter: { tags: SELECT } }) { fieldValue totalCount } } } `