Skip to content

Commit

Permalink
Flip the order of deleting and editing in the context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mybearworld committed Jul 6, 2024
1 parent 8140882 commit 8b8afda
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,18 @@ const PostBase = memo((props: PostBaseProps) => {
{credentials.username === props.post.u ? (
<>
<Popover.Close
className="px-2 py-1 text-left hover:bg-gray-100 dark:hover:bg-gray-800"
className="rounded-b-lg px-2 py-1 text-left hover:bg-gray-100 dark:hover:bg-gray-800"
type="button"
onClick={handleDelete}
onClick={() => setEditing((e) => !e)}
>
Delete
Edit
</Popover.Close>
<Popover.Close
className="rounded-b-lg px-2 py-1 text-left hover:bg-gray-100 dark:hover:bg-gray-800"
className="px-2 py-1 text-left hover:bg-gray-100 dark:hover:bg-gray-800"
type="button"
onClick={() => setEditing((e) => !e)}
onClick={handleDelete}
>
Edit
Delete
</Popover.Close>
</>
) : undefined}
Expand Down

0 comments on commit 8b8afda

Please sign in to comment.