diff --git a/client/homebrew/editor/metadataEditor/metadataEditor.jsx b/client/homebrew/editor/metadataEditor/metadataEditor.jsx index af357f4c0..adf25a8a2 100644 --- a/client/homebrew/editor/metadataEditor/metadataEditor.jsx +++ b/client/homebrew/editor/metadataEditor/metadataEditor.jsx @@ -1,7 +1,6 @@ /* eslint-disable max-lines */ import '../uiEditor.less'; -import React, {useState, useEffect} from 'react'; -import createReactClass from 'create-react-class'; +import React, { useState } from 'react'; import _ from 'lodash'; import request from '../../utils/request-middleware.js'; import Combobox from '@components/combobox.jsx'; @@ -20,27 +19,26 @@ const callIfExists = (val, fn, ...args)=>{ const MetadataEditor = ({ metadata = { - editId: null, - shareId: null, - title: '', - description: '', - thumbnail: '', - tags: [], - published: false, - authors: [], - renderer: 'legacy', - theme: '5ePHB', - lang: 'en', + editId : null, + shareId : null, + title : '', + description : '', + thumbnail : '', + tags : [], + published : false, + authors : [], + renderer : 'legacy', + theme : '5ePHB', + lang : 'en', }, - onChange = () => {}, - reportError = () => {}, - -}, ...props) => { + onChange = ()=>{}, + reportError = ()=>{}, + +}, ...props)=>{ const [isOwner, setIsOwner] = useState(global.account?.username && global.account?.username === metadata?.authors[0]); const [showThumbnail, setShowThumbnail] = useState(true); - const toggleThumbnailDisplay = ()=>{ setShowThumbnail(!showThumbnail); }; @@ -96,7 +94,7 @@ const MetadataEditor = ({ onChange(metadata, 'theme'); }; - const handleThemeWritein = (e) =>{ + const handleThemeWritein = (e)=>{ const shareId = e.target.value.split('/').pop(); //Extract just the ID if a URL was pasted in metadata.theme = shareId; @@ -329,7 +327,6 @@ const MetadataEditor = ({ ; }; - return (