File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,7 @@ import CustomInput from 'components/custom-input'
2121import ItemDetailsCard from 'components/item-details-card'
2222import { ItemTypes as AllItemTypes } from '@kleros/gtcr-encoder'
2323import { STATUS_CODE } from 'utils/item-status'
24-
25- const objectWithoutKey = ( object , key ) => {
26- // eslint-disable-next-line no-unused-vars
27- const { [ key ] : nothing , ...otherKeys } = object
28- return otherKeys
29- }
24+ import objectWithoutKey from 'utils/object-without-key'
3025
3126const ItemTypes = objectWithoutKey ( AllItemTypes , 'TWITTER_USER_ID' )
3227
Original file line number Diff line number Diff line change @@ -21,12 +21,7 @@ import CustomInput from 'components/custom-input'
2121import ItemDetailsCard from 'components/item-details-card'
2222import { ItemTypes as AllItemTypes } from '@kleros/gtcr-encoder'
2323import { STATUS_CODE } from 'utils/item-status'
24-
25- const objectWithoutKey = ( object , key ) => {
26- // eslint-disable-next-line no-unused-vars
27- const { [ key ] : nothing , ...otherKeys } = object
28- return otherKeys
29- }
24+ import objectWithoutKey from 'utils/object-without-key'
3025
3126const ItemTypes = objectWithoutKey ( AllItemTypes , 'TWITTER_USER_ID' )
3227
Original file line number Diff line number Diff line change 1+ // i don't want to have to import lodash just for this
2+
3+ const objectWithoutKey = ( object , key ) => {
4+ // eslint-disable-next-line no-unused-vars
5+ const { [ key ] : nothing , ...otherKeys } = object
6+ return otherKeys
7+ }
8+
9+ export default objectWithoutKey
You can’t perform that action at this time.
0 commit comments