fix: draft globals always displaying unpublish button

This commit is contained in:
Jarrod Flesch
2023-08-31 16:48:25 -04:00
parent 45905c312f
commit 9bc072ccaf

View File

@@ -48,6 +48,8 @@ const Status: React.FC = () => {
statusToRender = 'published';
}
if (global && ['published', 'draft'].includes(publishedDoc?._status)) statusToRender = publishedDoc._status;
const performAction = useCallback(async (action: 'revert' | 'unpublish') => {
let url;
let method;