Skip to content

Commit 3db3345

Browse files
committed
fix: stop showing lorem ipsum on empty long text
hack, jurors may still get confused over it but it being gray should at least convey the fact that it's explicitly empty
1 parent dd6e5b0 commit 3db3345

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/components/display-selector.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import PropTypes from 'prop-types'
55
import GTCRAddress from './gtcr-address'
66
import TwitterUser from './twitter-user'
77
import { ItemTypes } from '@kleros/gtcr-encoder'
8-
import { ZERO_ADDRESS, LOREM_IPSUM } from '../utils/string'
8+
import { ZERO_ADDRESS } from '../utils/string'
99
import RichAddress from './rich-address'
1010
import ETHAddress from './eth-address'
11+
import LongText from './long-text'
1112

1213
const pohRichAddress = 'eip155:1:0xc5e9ddebb09cd64dfacab4011a0d5cedaf7c9bdb'
1314

@@ -34,7 +35,7 @@ const DisplaySelector = ({ type, value, linkImage, allowedFileTypes }) => {
3435
case ItemTypes.BOOLEAN:
3536
return <Checkbox disabled checked={value} />
3637
case ItemTypes.LONG_TEXT:
37-
return <Typography.Paragraph>{value || LOREM_IPSUM}</Typography.Paragraph>
38+
return <LongText value={value} />
3839
case ItemTypes.FILE: {
3940
if (!value)
4041
return (

src/components/long-text.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Typography } from 'antd'
2+
import React from 'react'
3+
4+
const LongText = ({ value }) => {
5+
if (!value) return <span style={{ color: 'gray' }}>empty</span>
6+
7+
return <Typography.Paragraph>{value}</Typography.Paragraph>
8+
}
9+
10+
export default LongText

0 commit comments

Comments
 (0)