2022-09-22 09:37:49 +00:00
|
|
|
// in a separate file to avoid circular dependencies
|
2022-10-09 05:08:38 +00:00
|
|
|
import type { Author, Chat, Shout, Topic } from '../graphql/types.gen'
|
2022-09-22 09:37:49 +00:00
|
|
|
|
|
|
|
// all the things (she said) that could be passed from the server
|
|
|
|
export type PageProps = {
|
|
|
|
article?: Shout
|
2022-12-07 19:49:03 +00:00
|
|
|
layoutShouts?: Shout[]
|
|
|
|
authorShouts?: Shout[]
|
|
|
|
topicShouts?: Shout[]
|
|
|
|
homeShouts?: Shout[]
|
2022-09-22 09:37:49 +00:00
|
|
|
author?: Author
|
2022-10-05 15:11:14 +00:00
|
|
|
allAuthors?: Author[]
|
2022-09-22 09:37:49 +00:00
|
|
|
topic?: Topic
|
2022-10-05 15:11:14 +00:00
|
|
|
allTopics?: Topic[]
|
2022-09-22 09:37:49 +00:00
|
|
|
searchQuery?: string
|
2023-07-02 05:08:42 +00:00
|
|
|
layout?: LayoutType
|
2022-09-22 09:37:49 +00:00
|
|
|
// other types?
|
|
|
|
searchResults?: Shout[]
|
2022-10-09 05:08:38 +00:00
|
|
|
chats?: Chat[]
|
2022-09-22 09:37:49 +00:00
|
|
|
}
|
2022-11-13 19:35:57 +00:00
|
|
|
|
|
|
|
export type RootSearchParams = {
|
|
|
|
modal: string
|
|
|
|
lang: string
|
|
|
|
}
|
2022-12-02 06:12:50 +00:00
|
|
|
|
2023-06-16 14:47:24 +00:00
|
|
|
export type LayoutType = 'article' | 'audio' | 'video' | 'image' | 'literature'
|
2023-07-02 05:08:42 +00:00
|
|
|
|
2023-07-14 13:06:21 +00:00
|
|
|
export type FileTypeToUpload = 'image' | 'video' | 'doc' | 'audio'
|
|
|
|
|
2023-07-18 11:26:32 +00:00
|
|
|
export type MediaItem = {
|
|
|
|
url: string
|
|
|
|
title: string
|
|
|
|
body: string
|
|
|
|
source?: string // for image
|
|
|
|
pic?: string
|
|
|
|
|
|
|
|
// audio specific properties
|
2023-07-14 13:06:21 +00:00
|
|
|
date?: string
|
|
|
|
genre?: string
|
|
|
|
artist?: string
|
|
|
|
lyrics?: string
|
|
|
|
}
|
2023-07-02 05:08:42 +00:00
|
|
|
|
2023-07-14 13:06:21 +00:00
|
|
|
export type UploadedFile = {
|
|
|
|
url: string
|
2023-07-19 11:00:58 +00:00
|
|
|
originalFilename?: string
|
2023-07-02 05:08:42 +00:00
|
|
|
}
|