From 5d8cbbdf4e18234aedc6750d274e7bc6586b7ecd Mon Sep 17 00:00:00 2001 From: Michael Schramm Date: Sun, 21 Jun 2020 14:15:45 +0200 Subject: [PATCH] fix lint error --- components/form/admin/hooks.tab.tsx | 20 +++++++------------- components/structure.tsx | 1 - graphql/fragment/admin.form.fragment.ts | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/components/form/admin/hooks.tab.tsx b/components/form/admin/hooks.tab.tsx index f25f6967b..047650180 100644 --- a/components/form/admin/hooks.tab.tsx +++ b/components/form/admin/hooks.tab.tsx @@ -1,16 +1,10 @@ import { DeleteOutlined, PlusOutlined } from '@ant-design/icons/lib' -import { Button, Card, Checkbox, Form, Input, Popconfirm, Popover, Select, Space, Tabs, Tag } from 'antd' -import { FormInstance } from 'antd/lib/form' +import { Button, Card, Checkbox, Form, Input, Popconfirm, Space, Tabs } from 'antd' import { TabPaneProps } from 'antd/lib/tabs' -import { FieldData } from 'rc-field-form/lib/interface' -import React, { useCallback, useState } from 'react' +import React from 'react' import { useTranslation } from 'react-i18next' -import { AdminFormFieldFragment } from '../../../graphql/fragment/admin.form.fragment' -import { FieldCard } from './field.card' -import { adminTypes } from './types' -interface Props extends TabPaneProps { -} +interface Props extends TabPaneProps {} export const HooksTab: React.FC = (props) => { const { t } = useTranslation() @@ -18,7 +12,7 @@ export const HooksTab: React.FC = (props) => { return ( - {(hooks, { add, remove, move }) => { + {(hooks, { add, remove }) => { return (
@@ -34,7 +28,7 @@ export const HooksTab: React.FC = (props) => { const defaults = { id: `NEW-${Date.now()}`, enabled: false, - url: '' + url: '', } add(defaults) @@ -85,11 +79,11 @@ export const HooksTab: React.FC = (props) => { name={[hook.name, 'url']} rules={[ { required: true, message: t('validation:urlRequired') }, - { type: 'url', message: t('validation:invalidUrl')}, + { type: 'url', message: t('validation:invalidUrl') }, ]} labelCol={{ span: 6 }} > - + diff --git a/components/structure.tsx b/components/structure.tsx index 98b46c115..df1bdc78c 100644 --- a/components/structure.tsx +++ b/components/structure.tsx @@ -7,7 +7,6 @@ import { useRouter } from 'next/router' import React, { CSSProperties, FunctionComponent } from 'react' import { useTranslation } from 'react-i18next' import { ME_QUERY, MeQueryData } from '../graphql/query/me.query' -import { SETTINGS_QUERY, SettingsQueryData } from '../graphql/query/settings.query' import { languages } from '../i18n' import { sideMenu, SideMenuElement } from './sidemenu' import GitHubButton from 'react-github-button' diff --git a/graphql/fragment/admin.form.fragment.ts b/graphql/fragment/admin.form.fragment.ts index 2461fe0e4..97834f118 100644 --- a/graphql/fragment/admin.form.fragment.ts +++ b/graphql/fragment/admin.form.fragment.ts @@ -111,7 +111,7 @@ export const ADMIN_FORM_FRAGMENT = gql` language showFooter isLive - + hooks { id enabled