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:
parent
f159d93b4b
commit
0c269389de
1 changed files with 6 additions and 4 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue