Skip to content

Commit

Permalink
Поправил ошибки линтера.
Browse files Browse the repository at this point in the history
  • Loading branch information
ugputu18 committed Feb 16, 2024
1 parent c1b6a05 commit cb704bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ export const ContentEditorHTMLEditorMonacoEditor: React.FC<
const {component, components, name, props} = object
const code = JSON.stringify({component, components, name, props}, null, 2)
navigator.clipboard.writeText(code)
}, [element])
}, [object])

const copyTemplateCodeBtn = useMemo(() => {
return (
<Btn className="iconButton" onClick={copyTemplateCode}>
&lt;/&gt; Code
</Btn>
)
}, [])
}, [copyTemplateCode])

const hideCodeEditor = useMemo(() => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/HtmlTag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const HtmlTag: RedactorComponent = ({
const tagPropsExt = {className: componentClassName, controls: undefined, ...tagProps}

// Если нужно что-то отрендерить в <head>, ищем атрибут "data-head"
const renderToHead = tagProps.hasOwnProperty('data-head')
const renderToHead = Object.prototype.hasOwnProperty.call(tagProps, 'data-head')
if (renderToHead && !inEditMode) {
return <NextHead>{renderSimpleTag()}</NextHead>
}
Expand Down
4 changes: 2 additions & 2 deletions src/ui/AddWidgetButton/AddWidgetModal/buttons/CustomBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export const CustomBlockButton: React.FC<CustomBlockButtonProps> = (
return () => {
button.removeEventListener('click', onClick)
}
}, [buttonState, object, component, closeHandler, addComponent])
}, [button, buttonState, object, component, closeHandler, addComponent])

return useMemo(() => (
<AddWidgetModalButtonStyled ref={buttonState[1]} role="addHtmlEditor" {...other}>
{title}
</AddWidgetModalButtonStyled>
), [buttonState, other])
), [buttonState, title, other])
}

0 comments on commit cb704bd

Please sign in to comment.