Commit cdb9322b authored by Max Alekseenko's avatar Max Alekseenko

fix conflict

parent fbf1fb41
...@@ -4,16 +4,12 @@ import React from 'react'; ...@@ -4,16 +4,12 @@ import React from 'react';
import type { IconName } from 'ui/shared/IconSvg'; import type { IconName } from 'ui/shared/IconSvg';
import IconSvg from 'ui/shared/IconSvg'; import IconSvg from 'ui/shared/IconSvg';
import useMarketplaceWallet from './useMarketplaceWallet';
type Props = { type Props = {
internalWallet: boolean | undefined; internalWallet: boolean | undefined;
isWalletConnected: boolean;
} }
const MarketplaceAppAlert = ({ internalWallet }: Props) => { const MarketplaceAppAlert = ({ internalWallet, isWalletConnected }: Props) => {
const { address } = useMarketplaceWallet();
const isWalletConnected = Boolean(address);
const message = React.useMemo(() => { const message = React.useMemo(() => {
let icon: IconName = 'wallet'; let icon: IconName = 'wallet';
let text = 'Connect your wallet to Blockscout for full-featured access'; let text = 'Connect your wallet to Blockscout for full-featured access';
......
...@@ -16,9 +16,10 @@ import MarketplaceAppInfo from './MarketplaceAppInfo'; ...@@ -16,9 +16,10 @@ import MarketplaceAppInfo from './MarketplaceAppInfo';
type Props = { type Props = {
data: MarketplaceAppOverview | undefined; data: MarketplaceAppOverview | undefined;
isLoading: boolean; isLoading: boolean;
isWalletConnected: boolean;
} }
const MarketplaceAppTopBar = ({ data, isLoading }: Props) => { const MarketplaceAppTopBar = ({ data, isLoading, isWalletConnected }: Props) => {
const appProps = useAppContext(); const appProps = useAppContext();
const goBackUrl = React.useMemo(() => { const goBackUrl = React.useMemo(() => {
...@@ -42,7 +43,7 @@ const MarketplaceAppTopBar = ({ data, isLoading }: Props) => { ...@@ -42,7 +43,7 @@ const MarketplaceAppTopBar = ({ data, isLoading }: Props) => {
</LinkInternal> </LinkInternal>
</Tooltip> </Tooltip>
<Skeleton width={{ base: '100%', md: 'auto' }} order={{ base: 4, md: 2 }} isLoaded={ !isLoading }> <Skeleton width={{ base: '100%', md: 'auto' }} order={{ base: 4, md: 2 }} isLoaded={ !isLoading }>
<MarketplaceAppAlert internalWallet={ data?.internalWallet }/> <MarketplaceAppAlert internalWallet={ data?.internalWallet } isWalletConnected={ isWalletConnected }/>
</Skeleton> </Skeleton>
<Skeleton order={{ base: 2, md: 3 }} isLoaded={ !isLoading }> <Skeleton order={{ base: 2, md: 3 }} isLoaded={ !isLoading }>
<MarketplaceAppInfo data={ data }/> <MarketplaceAppInfo data={ data }/>
......
...@@ -140,7 +140,7 @@ const MarketplaceApp = () => { ...@@ -140,7 +140,7 @@ const MarketplaceApp = () => {
return ( return (
<> <>
<MarketplaceAppTopBar data={ data } isLoading={ isPending }/> <MarketplaceAppTopBar data={ data } isLoading={ isPending } isWalletConnected={ Boolean(address) }/>
<DappscoutIframeProvider <DappscoutIframeProvider
address={ address } address={ address }
appUrl={ data?.url } appUrl={ data?.url }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment