Skip to content

Commit

Permalink
fix: update some texts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Nam Dao committed Nov 24, 2022
1 parent d651ed4 commit e7034e8
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/Search/SearchResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default function SearchResult({ status, data }: SearchResultProps) {
{status === SearchStatusEnum.DONE && items?.length > 0 && (
<div className={clsx(styles.searchResultList, 'padding-top-lg')}>
<div className="text-base text-bold padding-bottom-sm margin-bottom-sm">
{items.length} search result:
{items.length} search results:
</div>
<div className={styles.resultScroll}>
{items.map(item => (
Expand Down
9 changes: 8 additions & 1 deletion pages/address/[address].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const AddressDetailPage: React.FC<Props> = props => {
const { isMobile } = useMobileLayout()
const { address, addressData, errorMessage } = props

const isMainnet = window?.location?.hostname?.includes('.astranaut.io')
const isContract = addressData?.type === 'contractaddress'
const title = isContract
? `Contract ${address} | ${process.env.NEXT_PUBLIC_TITLE}`
Expand All @@ -45,7 +46,13 @@ const AddressDetailPage: React.FC<Props> = props => {
<AddressDetailTabs address={address} addressData={addressData} />
</>
) : (
<h1 className="text contrast-color-70 margin-top-sm">{errorMessage || 'Address Not Found'}</h1>
<h1 className="text contrast-color-70 margin-top-sm">
{isMainnet
? errorMessage
? 'Something went wrong'
: 'Address Not Found'
: errorMessage || 'Address Not Found'}
</h1>
)}
</Container>
</Layout>
Expand Down
9 changes: 8 additions & 1 deletion pages/blocks/[block].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type Props = {
}

const BlockDetailPage: React.FC<Props> = ({ errorMessage, blockDetail, blockHeight, transactions }: Props) => {
const isMainnet = window?.location?.hostname?.includes('.astranaut.io')
const _convertRawDataToCardData = data => {
const keys = Object.keys(data)
let items: CardRowItem[] = []
Expand Down Expand Up @@ -122,7 +123,13 @@ const BlockDetailPage: React.FC<Props> = ({ errorMessage, blockDetail, blockHeig
</BackgroundCard>
</>
) : (
<h1 className="text contrast-color-70 margin-top-sm">{errorMessage || 'Block Not Found'}</h1>
<h1 className="text contrast-color-70 margin-top-sm">
{isMainnet
? errorMessage
? 'Something went wrong'
: 'Block Not Found'
: errorMessage || 'Block Not Found'}
</h1>
)}
</Container>
</Layout>
Expand Down
9 changes: 8 additions & 1 deletion pages/token/[token].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const TokenDetailPage: React.FC<Props> = props => {
const { isMobile } = useMobileLayout()
const { token, tokenData, errorMessage } = props

const isMainnet = window?.location?.hostname?.includes('.astranaut.io')
const title = tokenData
? `${tokenData.name} (${tokenData.symbol}) - ${process.env.NEXT_PUBLIC_TITLE}`
: `Token ${token}`
Expand All @@ -44,7 +45,13 @@ const TokenDetailPage: React.FC<Props> = props => {
<TokenDetailTab token={token} tokenData={tokenData} />
</>
) : (
<h1 className="text contrast-color-70 margin-top-sm">{errorMessage || 'Token Not Found'}</h1>
<h1 className="text contrast-color-70 margin-top-sm">
{isMainnet
? errorMessage
? 'Something went wrong'
: 'Token Not Found'
: errorMessage || 'Token Not Found'}
</h1>
)}
</Container>
</Layout>
Expand Down
10 changes: 8 additions & 2 deletions pages/tx/[tx].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const TransactionDetailPage: React.FC<Props> = ({ errorMessage, data, evmHash, c
const { isMobile } = useMobileLayout('small')
const [items, moreItems] = useConvertData({ data })
const hash = evmHash || cosmosHash

const isMainnet = window?.location?.hostname?.includes('.astranaut.io')
return (
<Layout>
<Head>
Expand Down Expand Up @@ -66,7 +66,13 @@ const TransactionDetailPage: React.FC<Props> = ({ errorMessage, data, evmHash, c
/>
</>
) : (
<h1 className="text contrast-color-70 margin-top-sm">{errorMessage || 'Token Not Found'}</h1>
<h1 className="text contrast-color-70 margin-top-sm">
{isMainnet
? errorMessage
? 'Something went wrong'
: 'Transaction Not Found'
: errorMessage || 'Transaction Not Found'}
</h1>
)}
</Container>
</Layout>
Expand Down

0 comments on commit e7034e8

Please sign in to comment.