Skip to content

Commit

Permalink
fix(frontend): canEditNote note menu
Browse files Browse the repository at this point in the history
  • Loading branch information
caipira113 committed Sep 28, 2024
1 parent c661318 commit c0d0b64
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/frontend/src/scripts/get-note-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,13 @@ export function getNoteMenu(props: {
if (appearNote.userId === $i.id || $i.isModerator || $i.isAdmin) {
menuItems.push({ type: 'divider' });
if (appearNote.userId === $i.id) {
menuItems.push({
icon: 'ti ti-edit',
text: i18n.ts.edit,
action: edit,
});
if ($i.policies.canEditNote) {

Check failure on line 458 in packages/frontend/src/scripts/get-note-menu.ts

View workflow job for this annotation

GitHub Actions / lint (frontend)

Multiple spaces found before '('
menuItems.push({
icon: 'ti ti-edit',
text: i18n.ts.edit,
action: edit,
});
}
menuItems.push({
icon: 'ti ti-edit',
text: i18n.ts.deleteAndEdit,
Expand Down

1 comment on commit c0d0b64

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chromatic detects changes. Please review the changes on Chromatic.

Please sign in to comment.