fix: update post editor actions based on draft/published status

When editing a draft post, the primary action is now "Save draft" with "Publish" in the dropdown menu. When editing a published post, the primary action is "Save post" with "Save as Draft" in the dropdown.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Justin Edmund 2025-08-23 01:02:33 -04:00
parent f159d93b4b
commit 0c269389de

View file

@ -367,10 +367,12 @@
onStatusChange={handleSave}
disabled={saving}
isLoading={saving}
primaryAction={status === 'published'
? { label: 'Save', status: 'published' }
: { label: 'Publish', status: 'published' }}
dropdownActions={[{ label: 'Save as Draft', status: 'draft', show: status !== 'draft' }]}
primaryAction={status === 'draft'
? { label: 'Save draft', status: 'draft' }
: { label: 'Save post', status: 'published' }}
dropdownActions={status === 'draft'
? [{ label: 'Publish', status: 'published' }]
: [{ label: 'Save as Draft', status: 'draft' }]}
viewUrl={slug ? `/universe/${slug}` : undefined}
/>
</div>