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

Commit e6c9394

Browse files
committed
Better conditional rendering on network error text
1 parent 96c2e1a commit e6c9394

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

frontend/src/components/DirectMint/DirectMint.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,14 @@ const DirectMint = ({ developerId }: DirectMintProps) => {
269269
</ModalContent>
270270
</Modal>
271271
)}
272-
273-
{networkError && NODE_ENV === 'development' && (
274-
<Text color="red">{t('ethereumDevNetworkPrompt')}</Text>
275-
)}
276-
{networkError && NODE_ENV === 'production' && (
277-
<Text color="red">{t('ethereumNetworkPrompt')}</Text>
272+
{networkError && (
273+
<Text color="red">
274+
{t(
275+
NODE_ENV === 'development'
276+
? 'ethereumDevNetworkPrompt'
277+
: 'ethereumNetworkPrompt',
278+
)}
279+
</Text>
278280
)}
279281
</>
280282
);

0 commit comments

Comments
 (0)