webapp/src/components/types.ts

17 lines
418 B
TypeScript
Raw Normal View History

2022-09-22 09:37:49 +00:00
// in a separate file to avoid circular dependencies
import type { Author, Shout, Topic } from '../graphql/types.gen'
// all the things (she said) that could be passed from the server
export type PageProps = {
randomTopics?: Topic[]
article?: Shout
articles?: Shout[]
author?: Author
authors?: Author[]
topic?: Topic
topics?: Topic[]
searchQuery?: string
// other types?
searchResults?: Shout[]
}