File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/react/src/hooks/document Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -25,21 +25,21 @@ import {useSanityInstance} from '../context/useSanityInstance'
25
25
* import {publishDocument} from '@sanity/sdk'
26
26
*
27
27
* export function PublishButton({doc}: {doc: DocumentHandle}) {
28
- * const canPublish = usePermissions(publishDocument(doc))
28
+ * const publishPermissions = usePermissions(publishDocument(doc))
29
29
* const applyAction = useApplyActions()
30
30
*
31
31
* return (
32
32
* <>
33
33
* <button
34
- * disabled={!canPublish .allowed}
34
+ * disabled={!publishPermissions .allowed}
35
35
* onClick={() => applyAction(publishDocument(doc))}
36
- * popoverTarget={`${canPublish .allowed ? undefined : 'publishButtonPopover'}`}
36
+ * popoverTarget={`${publishPermissions .allowed ? undefined : 'publishButtonPopover'}`}
37
37
* >
38
38
* Publish
39
39
* </button>
40
- * {!canPublish .allowed && (
40
+ * {!publishPermissions .allowed && (
41
41
* <div popover id="publishButtonPopover">
42
- * {canPublish .message}
42
+ * {publishPermissions .message}
43
43
* </div>
44
44
* )}
45
45
* </>
You can’t perform that action at this time.
0 commit comments