diff --git a/web/src/components/molecules/AddNewPluginPage/AddNewPluginContent.tsx b/web/src/components/molecules/AddNewPluginPage/AddNewPluginContent.tsx index 6d1630da..8ac18b05 100644 --- a/web/src/components/molecules/AddNewPluginPage/AddNewPluginContent.tsx +++ b/web/src/components/molecules/AddNewPluginPage/AddNewPluginContent.tsx @@ -56,20 +56,14 @@ const AddNewPluginContent: React.FC = ({ - @@ -79,8 +73,7 @@ const AddNewPluginContent: React.FC = ({ defaultActiveKey={currentTab} tabBarStyle={{ margin: 0 }} activeKey={currentTab} - onChange={handleClickDetailSetting} - > + onChange={handleClickDetailSetting}> = ({ handleParsePlugin, handleChangeGithubUrl, }) => { - const [currentRadio, changeRadio] = useState< - "Upload from local" | "GitHub repository" - >("Upload from local"); + const [currentRadio, changeRadio] = useState<"Upload from local" | "GitHub repository">( + "Upload from local", + ); const handleChangeRadio = (e: RadioChangeEvent) => { changeRadio(e.target.value); }; @@ -43,12 +43,8 @@ const PackageArea: React.FC = ({ - - Upload from local - - - GitHub repository - + Upload from local + GitHub repository @@ -60,31 +56,26 @@ const PackageArea: React.FC = ({ accept=".zip" maxCount={1} multiple={false} - beforeUpload={(file) => { + beforeUpload={file => { const isZip = file.type === "application/zip"; if (!isZip) { Message.error(`${file.name} is not a zip file`); } return isZip || Upload.LIST_IGNORE; }} - customRequest={(info) => handleParsePlugin(info.file)} - onChange={(info) => { + customRequest={info => handleParsePlugin(info.file)} + onChange={info => { const { status } = info.file; if (status === "done") { - Message.success( - `${info.file.name} file uploaded successfully.` - ); + Message.success(`${info.file.name} file uploaded successfully.`); } else if (status === "error") { Message.error(`${info.file.name} file upload failed.`); } - }} - > + }}>

-

- Click or drag file to this area to upload -

+

Click or drag file to this area to upload

) : ( @@ -92,7 +83,7 @@ const PackageArea: React.FC = ({ { + onChange={e => { handleChangeGithubUrl(e.target.value); }} /> diff --git a/web/src/components/molecules/AddNewPluginPage/SettingArea.tsx b/web/src/components/molecules/AddNewPluginPage/SettingArea.tsx index 7fea856f..658bc937 100644 --- a/web/src/components/molecules/AddNewPluginPage/SettingArea.tsx +++ b/web/src/components/molecules/AddNewPluginPage/SettingArea.tsx @@ -12,12 +12,7 @@ export type Props = { description: string; handleUploadImages: (image: UploadRequestOption) => void; }; -const SettingArea: React.FC = ({ - pluginName, - version, - description, - handleUploadImages, -}) => { +const SettingArea: React.FC = ({ pluginName, version, description, handleUploadImages }) => { return ( @@ -32,12 +27,11 @@ const SettingArea: React.FC = ({ { + customRequest={image => { handleUploadImages(image); }} defaultFileList={[]} - multiple - > + multiple> diff --git a/web/src/components/molecules/MyPluginsPage/MyPluginsTable.tsx b/web/src/components/molecules/MyPluginsPage/MyPluginsTable.tsx index a49eceab..79060373 100644 --- a/web/src/components/molecules/MyPluginsPage/MyPluginsTable.tsx +++ b/web/src/components/molecules/MyPluginsPage/MyPluginsTable.tsx @@ -23,7 +23,7 @@ const MyPluginsTable: React.FC = ({ data, handlePublishClick }) => { title: "Plugin Name", dataIndex: "name", key: "name", - render: (text) => {text}, + render: text => {text}, }, { title: "Status", @@ -62,7 +62,7 @@ const MyPluginsTable: React.FC = ({ data, handlePublishClick }) => { title: "Action", key: "action", dataIndex: "id", - render: (id) => { + render: id => { return ( {/* diff --git a/web/src/components/molecules/PluginsListCard/index.tsx b/web/src/components/molecules/PluginsListCard/index.tsx index 1e711590..1e26f772 100644 --- a/web/src/components/molecules/PluginsListCard/index.tsx +++ b/web/src/components/molecules/PluginsListCard/index.tsx @@ -44,8 +44,7 @@ const PluginsListCard: React.FC = ({ size="small" bordered={false} onClick={onClick} - bodyStyle={{ padding: "4px 0" }} - > + bodyStyle={{ padding: "4px 0" }}> {author} diff --git a/web/src/components/molecules/SearchArea/index.tsx b/web/src/components/molecules/SearchArea/index.tsx index e66ca9ae..bb651fd1 100644 --- a/web/src/components/molecules/SearchArea/index.tsx +++ b/web/src/components/molecules/SearchArea/index.tsx @@ -26,39 +26,38 @@ export type Props = { // }, // ]; -const orderMenuItems: Array<{ label: string; key: number; value: PluginSort }> = - [ - { - label: "ダウンロード数降順", - key: 1, - value: PluginSort.DownloadsAsc, - }, - { - label: "ダウンロード数昇順", - key: 2, - value: PluginSort.DownloadsDesc, - }, - { - label: "名前降順", - key: 3, - value: PluginSort.NameAsc, - }, - { - label: "名前昇順", - key: 4, - value: PluginSort.NameDesc, - }, - { - label: "公開日降順", - key: 5, - value: PluginSort.PublishedatAsc, - }, - { - label: "公開日昇順", - key: 6, - value: PluginSort.PublishedatDesc, - }, - ]; +const orderMenuItems: Array<{ label: string; key: number; value: PluginSort }> = [ + { + label: "ダウンロード数降順", + key: 1, + value: PluginSort.DownloadsAsc, + }, + { + label: "ダウンロード数昇順", + key: 2, + value: PluginSort.DownloadsDesc, + }, + { + label: "名前降順", + key: 3, + value: PluginSort.NameAsc, + }, + { + label: "名前昇順", + key: 4, + value: PluginSort.NameDesc, + }, + { + label: "公開日降順", + key: 5, + value: PluginSort.PublishedatAsc, + }, + { + label: "公開日昇順", + key: 6, + value: PluginSort.PublishedatDesc, + }, +]; const SearchArea: React.FC = ({ onSearch, @@ -74,14 +73,12 @@ const SearchArea: React.FC = ({ // updateDisplayMenuState(Number(e.key)); // }; - const handleOrderMenuClick: MenuProps["onClick"] = (e) => { + const handleOrderMenuClick: MenuProps["onClick"] = e => { updateOrderMenuState(Number(e.key)); }; // const displayMenu = ; - const orderMenu = ( - - ); + const orderMenu = ; return ( @@ -106,8 +103,7 @@ const SearchArea: React.FC = ({ {isLoggedIn ? (