Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #73 from klaytn/develop
Browse files Browse the repository at this point in the history
Add inapp browser link on NFT web3modal page
  • Loading branch information
Yeonju-Kim authored Dec 23, 2022
2 parents f5724fa + 31c2e6b commit 79b2a9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/Web3modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { KaikasWeb3Provider } from '@klaytn/kaikas-web3-provider'
import { KlipWeb3Provider } from '@klaytn/klip-web3-provider'
import _ from 'lodash'
import { TransactionReceipt } from 'web3-core'
import { isMobile } from 'react-device-detect'

import {
Button,
Expand Down Expand Up @@ -38,7 +39,6 @@ import {
Modal,
} from './web3modalComponents'
import { callBalanceOf, callTransfer } from './helpers/web3'
import { isMobile } from 'react-device-detect'

const SLayout = styled.div`
position: relative;
Expand Down
11 changes: 11 additions & 0 deletions src/views/Web3modal/web3modalNFT.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Web3Modal from '@klaytn/web3modal'
import { KaikasWeb3Provider } from '@klaytn/kaikas-web3-provider'
import { KlipWeb3Provider } from '@klaytn/klip-web3-provider'
import _ from 'lodash'
import { isMobile } from 'react-device-detect'

import {
Button,
Expand All @@ -17,6 +18,7 @@ import {
CardSection,
Loading,
View,
LinkA,
} from 'components'
import { IAssetData } from 'types'
import { WEB3MODAL } from 'consts'
Expand Down Expand Up @@ -111,6 +113,7 @@ const Web3modalNFT = (): ReactElement => {
const [toAddressForMint, setToAddressForMint] = useState<string>('')
const [tokenIdForMint, setTokenIdForMint] = useState<string>('')
const [tokenURIForMint, setTokenURIForMint] = useState<string>('')
const href = window.location.href

const getAccountAssets = async ({
changedAddress,
Expand Down Expand Up @@ -417,6 +420,14 @@ const Web3modalNFT = (): ReactElement => {
) : (
<SLanding>
<h2>{`Test Web3Modal`}</h2>
{isMobile && (
<View style={{ paddingBottom: 10 }}>
<LinkA link={`https://app.kaikas.io/u/${href}`}>
If using mobile device, please click here to open in-app
browser of Kaikas Mobile
</LinkA>
</View>
)}
<Button onClick={onConnect}> Connect </Button>
</SLanding>
)}
Expand Down

0 comments on commit 79b2a9e

Please sign in to comment.