Skip to content

Commit

Permalink
remove uneeded edit prop check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sartxi committed Jul 17, 2024
1 parent a31742f commit 5a4444e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libs/blocks/locui/url/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ function useActionState(item) {
function Actions({ item }) {
const { isValid, preview, live } = useActionState(item);
const isExcel = item.value.path.endsWith('.json') ? ' locui-url-action-edit-excel' : ' locui-url-action-edit-word';
const editable = item.value.edit?.status !== 404;
return html`
<div class=locui-url-source-actions>
<button
disabled=${!editable}
class="locui-url-action locui-url-action-edit${isExcel}${!editable ? ' disabled' : ''}"
disabled=${!isValid}
class="locui-url-action locui-url-action-edit${isExcel}${!isValid ? ' disabled' : ''}"
onClick=${(e) => openWord(e, item)}>Edit</button>
<button
disabled=${!isValid}
Expand Down

0 comments on commit 5a4444e

Please sign in to comment.