Skip to content

Commit c218bff

Browse files
committed
refactor: remove TwitterID components
1 parent fdc729c commit c218bff

File tree

8 files changed

+6
-201
lines changed

8 files changed

+6
-201
lines changed

src/components/display-selector.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Typography, Avatar, Checkbox } from 'antd'
33
import styled from 'styled-components/macro'
44
import PropTypes from 'prop-types'
55
import GTCRAddress from './gtcr-address'
6-
import TwitterUser from './twitter-user'
76
import { ItemTypes } from '@kleros/gtcr-encoder'
87
import { ZERO_ADDRESS } from '../utils/string'
98
import RichAddress from './rich-address'
@@ -68,8 +67,6 @@ const DisplaySelector = ({ type, value, linkImage, allowedFileTypes }) => {
6867
<Typography.Text>{value}</Typography.Text>
6968
</a>
7069
)
71-
case ItemTypes.TWITTER_USER_ID:
72-
return <TwitterUser userID={value} />
7370
default:
7471
return (
7572
<Typography.Paragraph>

src/components/input-selector.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { ItemTypes } from '@kleros/gtcr-encoder'
88
import CustomInput from './custom-input.js'
99
import ipfsPublish from '../utils/ipfs-publish.js'
1010
import { sanitize } from '../utils/string.js'
11-
import TwitterUserInput from './twitter-input.js'
1211
import AddressInput from './address-input.js'
1312
import RichAddressInput from './rich-address-input.js'
1413

@@ -216,14 +215,6 @@ const InputSelector = ({
216215
</StyledUpload>
217216
</>
218217
)
219-
case ItemTypes.TWITTER_USER_ID:
220-
return (
221-
<TwitterUserInput
222-
name={name}
223-
label={label}
224-
setFieldValue={setFieldValue}
225-
/>
226-
)
227218
default:
228219
throw new Error(`Unhandled input type ${type}`)
229220
}

src/components/item-card-content.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ const ItemCardContent = ({ item, chainId, tcrAddress }) => (
3232
col =>
3333
col.isIdentifier ||
3434
col.type === ItemTypes.IMAGE ||
35-
col.type === ItemTypes.FILE ||
36-
col.type === ItemTypes.TWITTER_USER_ID
35+
col.type === ItemTypes.FILE
3736
)
3837
.map((column, j) => (
3938
<StyledItemCol key={j}>

src/components/light-item-card-content.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ const LightItemCardContent = ({ item, chainId, tcrAddress }) => (
3232
col =>
3333
col.isIdentifier ||
3434
col.type === ItemTypes.IMAGE ||
35-
col.type === ItemTypes.FILE ||
36-
col.type === ItemTypes.TWITTER_USER_ID
35+
col.type === ItemTypes.FILE
3736
)
3837
.map((column, j) => (
3938
<StyledItemCol key={j}>

src/components/twitter-input.js

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/components/twitter-user.js

Lines changed: 0 additions & 85 deletions
This file was deleted.

src/pages/factory-classic/item-params.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import ItemDetailsCard from 'components/item-details-card'
2222
import { ItemTypes } from '@kleros/gtcr-encoder'
2323
import { STATUS_CODE } from 'utils/item-status'
2424

25-
const { IMAGE, FILE, GTCR_ADDRESS, TWITTER_USER_ID, LONG_TEXT } = ItemTypes
25+
const { IMAGE, FILE, GTCR_ADDRESS, LONG_TEXT } = ItemTypes
2626

2727
const StyledAlert = styled(Alert)`
2828
margin-bottom: 42px;
@@ -220,8 +220,7 @@ const ItemParams = ({
220220
columns[index].isIdentifier) &&
221221
columns[index].type !== LONG_TEXT &&
222222
columns[index].type !== IMAGE &&
223-
columns[index].type !== FILE &&
224-
columns[index].type !== TWITTER_USER_ID ? ( // Image, file, twitter user and long text cannot be identifiers.
223+
columns[index].type !== FILE ? ( // Image, file and long text cannot be identifiers.
225224
<Col span={3}>
226225
<Field name={`columns[${index}].isIdentifier`}>
227226
{({ field }) => (

src/pages/factory/item-params.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import ItemDetailsCard from 'components/item-details-card'
2222
import { ItemTypes } from '@kleros/gtcr-encoder'
2323
import { STATUS_CODE } from 'utils/item-status'
2424

25-
const { IMAGE, FILE, GTCR_ADDRESS, TWITTER_USER_ID, LONG_TEXT } = ItemTypes
25+
const { IMAGE, FILE, GTCR_ADDRESS, LONG_TEXT } = ItemTypes
2626

2727
const StyledAlert = styled(Alert)`
2828
margin-bottom: 42px;
@@ -220,8 +220,7 @@ const ItemParams = ({
220220
columns[index].isIdentifier) &&
221221
columns[index].type !== LONG_TEXT &&
222222
columns[index].type !== IMAGE &&
223-
columns[index].type !== FILE &&
224-
columns[index].type !== TWITTER_USER_ID ? ( // Image, file, twitter user and long text cannot be identifiers.
223+
columns[index].type !== FILE ? ( // Image, file and long text cannot be identifiers.
225224
<Col span={3}>
226225
<Field name={`columns[${index}].isIdentifier`}>
227226
{({ field }) => (

0 commit comments

Comments
 (0)