Skip to content

Commit

Permalink
fix: remove tabs UTF8 when text is utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
tiendn committed Mar 30, 2023
1 parent 782b788 commit bf6aa17
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions components/Card/CardInfo/Components/RawInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,21 @@ export default function RawInput({ text }: RawInputProps) {
Sentry.captureException(e)
}

const tabs = []
if (isHex) tabs.push({ title: 'Hex', id: 'hex', padding: ' ' })
tabs.push({ title: 'UTF-8', id: 'utf8', padding: ' ' })
if (!isHex) {
return (
<div style={{ maxWidth: '885px', maxHeight: '200px', overflowY: 'auto' }}>
<Copy text={utf8Text} />
</div>
)
}

return (
<div style={{ maxWidth: '885px', maxHeight: '200px', overflowY: 'auto' }}>
<Tabs
tabs={tabs}
tabs={[
{ title: 'Hex', id: 'hex', padding: ' ' },
{ title: 'UTF-8', id: 'utf8', padding: ' ' }
]}
contents={{
hex: <Copy text={text} />,
utf8: <Copy text={utf8Text} />
Expand Down

0 comments on commit bf6aa17

Please sign in to comment.