Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eran Hirsch committed Nov 5, 2024
1 parent 7c9ec9c commit 516c30b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ const DocumentInfo: React.FC<Props> = ({
const { permissions } = useAuth()
const { code } = useLocale()
const { uploadEdits } = useUploadEdits()
const [publishedDoc, setPublishedDoc] = useState<TypeWithID & TypeWithTimestamps>(null)
const [versions, setVersions] = useState<PaginatedDocs<Version>>(null)
const [unpublishedVersions, setUnpublishedVersions] = useState<PaginatedDocs<Version>>(null)
const [publishedDoc, setPublishedDoc] = useState<(TypeWithID & TypeWithTimestamps) | null>(null)
const [versions, setVersions] = useState<PaginatedDocs<Version> | null>(null)
const [unpublishedVersions, setUnpublishedVersions] = useState<PaginatedDocs<Version> | null>(
null,
)

const baseURL = `${serverURL}${api}`
let slug: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export type ContextType = {
global?: SanitizedGlobalConfig
id?: number | string
preferencesKey?: string
publishedDoc?: TypeWithID & TypeWithTimestamps & { _status?: string }
publishedDoc?: (TypeWithID & TypeWithTimestamps & { _status?: string }) | null
setDocFieldPreferences: (field: string, fieldPreferences: { [key: string]: unknown }) => void
slug?: string
unpublishedVersions?: PaginatedDocs<Version>
versions?: PaginatedDocs<Version>
unpublishedVersions?: PaginatedDocs<Version> | null
versions?: PaginatedDocs<Version> | null
}

export type Props = {
Expand Down

0 comments on commit 516c30b

Please sign in to comment.