Skip to content

Commit

Permalink
fix(components): Default to mainnet explorer for history and metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
bestatigen committed Jul 14, 2022
1 parent 32f4d7e commit 495207c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/History.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Box, Heading, Text, Link} from "theme-ui";
import moment from "moment";

const EXPLORER_URL = process.env.NEAR_ENV == 'mainnet' ?
'https://explorer.near.org' : 'https://explorer.testnet.near.org';
const EXPLORER_URL = process.env.NEAR_ENV == 'testnet' ?
'https://explorer.testnet.near.org' : 'https://explorer.near.org';

console.log(process.env.NEAR_ENV);

Expand Down
6 changes: 4 additions & 2 deletions packages/components/src/Metadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import { Box, Flex, Heading, Text, Link } from 'theme-ui'
import { Placeholder } from './Placeholder'

const EXPLORER_URL = process?.env?.NEAR_ENV == 'mainnet' ?
'https://explorer.near.org' : 'https://explorer.testnet.near.org';
const EXPLORER_URL = process.env.NEAR_ENV == 'testnet' ?
'https://explorer.testnet.near.org' : 'https://explorer.near.org';

console.log(process.env.NEAR_ENV);

type NFTMetadataType = {
creator_id?: string
Expand Down

0 comments on commit 495207c

Please sign in to comment.