mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Allow opt into transcripts feature, create UI
This commit is contained in:
parent
21d4efc2b5
commit
10bd05c6a8
1 changed files with 3 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import useSWR from 'swr'
|
|||
import { publicGqlFetcher } from '../networkHelpers'
|
||||
|
||||
type ViewerQueryResponse = {
|
||||
mutate: () => void
|
||||
viewerData?: ViewerQueryResponseData
|
||||
viewerDataError?: unknown
|
||||
isLoading: boolean
|
||||
|
|
@ -51,9 +52,10 @@ export function useGetViewerQuery(): ViewerQueryResponse {
|
|||
}
|
||||
`
|
||||
|
||||
const { data, error } = useSWR(query, publicGqlFetcher)
|
||||
const { data, error, mutate } = useSWR(query, publicGqlFetcher)
|
||||
|
||||
return {
|
||||
mutate,
|
||||
viewerData: data as ViewerQueryResponseData,
|
||||
viewerDataError: error, // TODO: figure out error possibilities
|
||||
isLoading: !error && !data,
|
||||
|
|
|
|||
Loading…
Reference in a new issue