Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
wodka committed Jun 21, 2020
1 parent 561a8d6 commit 5d8cbbd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
20 changes: 7 additions & 13 deletions components/form/admin/hooks.tab.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
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> = (props) => {
const { t } = useTranslation()

return (
<Tabs.TabPane {...props}>
<Form.List name={['form', 'hooks']}>
{(hooks, { add, remove, move }) => {
{(hooks, { add, remove }) => {
return (
<div>
<Form.Item wrapperCol={{ span: 24 }}>
Expand All @@ -34,7 +28,7 @@ export const HooksTab: React.FC<Props> = (props) => {
const defaults = {
id: `NEW-${Date.now()}`,
enabled: false,
url: ''
url: '',
}

add(defaults)
Expand Down Expand Up @@ -85,11 +79,11 @@ export const HooksTab: React.FC<Props> = (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 }}
>
<Input />
<Input />
</Form.Item>
</Card>
</Form.Item>
Expand Down
1 change: 0 additions & 1 deletion components/structure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion graphql/fragment/admin.form.fragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const ADMIN_FORM_FRAGMENT = gql`
language
showFooter
isLive
hooks {
id
enabled
Expand Down

0 comments on commit 5d8cbbd

Please sign in to comment.