chore: simplify logic for global status rendering

This commit is contained in:
Jarrod Flesch
2023-09-05 16:04:56 -04:00
parent b649ad7bb5
commit 2dcce0339c

View File

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