Disable RichEditor on non draft version
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -31,6 +31,7 @@ export const documentDescriptionPageQuery = graphql`
|
||||
... on DocumentVersion {
|
||||
id
|
||||
content
|
||||
status
|
||||
}
|
||||
}
|
||||
document: node(id: $documentId) {
|
||||
@@ -42,6 +43,7 @@ export const documentDescriptionPageQuery = graphql`
|
||||
node {
|
||||
id
|
||||
content
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,6 +120,7 @@ export function DocumentDescriptionPage(props: { queryRef: PreloadedQuery<Docume
|
||||
<div>
|
||||
<RichEditor
|
||||
content={currentVersion.content}
|
||||
disabled={currentVersion.status !== "DRAFT"}
|
||||
onChange={handleUpdate}
|
||||
/>
|
||||
{/* <Markdown content={currentVersion.content} /> */}
|
||||
|
||||
Reference in New Issue
Block a user