Skip to content

Commit

Permalink
Merge pull request #56 from Propy/dev
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
JayWelsh authored Jan 3, 2024
2 parents 28742b2 + 556d4bd commit db83c31
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/PageContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const PageContainer = (props: PropsFromRedux) => {

const {
isConsideredMobile,
darkMode,
} = props;

const classes = useStyles();
Expand Down Expand Up @@ -73,10 +74,10 @@ const PageContainer = (props: PropsFromRedux) => {
{isLayoutInitialized &&
<Routes>
<Route path="/" element={<HomePage/>} />
<Route path="/my-assets" element={<AccountTokensPage/>} />
<Route path="/my-assets" element={<AccountTokensPage darkMode={darkMode}/>} />
<Route path="/token/:network/:tokenAddress" element={<SingleTokenPage/>} />
<Route path="/token/:network/:tokenAddress/:tokenId" element={<SingleTokenPage/>} />
<Route path="/account/:accountAddress" element={<AccountTokensPage/>} />
<Route path="/account/:accountAddress" element={<AccountTokensPage darkMode={darkMode} />} />
<Route path="/collections" element={<CollectionsPage/>} />
<Route path="/collection/:network/:contractNameOrCollectionNameOrAddress" element={<CollectionPage/>} />
<Route path="/recently-minted" element={<RecentlyMintedPage/>} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReserveAnAddressHomeBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const ReserveAnAddressHomeBanner = (props: PropsFromRedux) => {
isConsideredMobile,
} = props;

let collectionConfigEntry = COLLECTIONS_PAGE_ENTRIES.find((entry) => entry.slug === (process?.env?.REACT_APP_ENV === 'prod' ? 'propykeys' : 'propy-home-nft-dev-testnet'));
let collectionConfigEntry = COLLECTIONS_PAGE_ENTRIES.find((entry) => entry.slug === (process?.env?.REACT_APP_ENV === 'prod' ? 'propykeys' : 'propy-home-nft-dev-base-testnet'));

const [nftCoordinates, setNftCoordinates] = useState<ICoordinate[]>([]);

Expand Down
2 changes: 2 additions & 0 deletions src/containers/PageContainerContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import PageContainer from '../components/PageContainer';
interface RootState {
isConsideredMobile: boolean
isConsideredMedium: boolean
darkMode: boolean
}

const mapStateToProps = (state: RootState) => ({
isConsideredMobile: state.isConsideredMobile,
isConsideredMedium: state.isConsideredMedium,
darkMode: state.darkMode,
})

const connector = connect(mapStateToProps, {})
Expand Down
23 changes: 21 additions & 2 deletions src/pages/AccountTokensPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@ import { useParams } from 'react-router-dom';

import { useAccount } from 'wagmi';

import Typography from '@mui/material/Typography';

import GenericPageContainer from '../containers/GenericPageContainer';
import AccountTokensBannerContainer from '../containers/AccountTokensBannerContainer';
import { Web3ModalButtonWagmi } from '../components/Web3ModalButtonWagmi';

interface IProps {
darkMode?: boolean;
}

const AccountTokensPage = () => {
const AccountTokensPage = (props: IProps) => {

let {
darkMode = false,
} = props;

const { address } = useAccount();

Expand All @@ -18,14 +29,22 @@ const AccountTokensPage = () => {
return (
<>
<GenericPageContainer
title="My Assets"
title={accountAddress ? "Account Assets" : "My Assets"}
>
{address && !accountAddress &&
<AccountTokensBannerContainer maxRecords={20} showPagination={true} account={address} />
}
{accountAddress &&
<AccountTokensBannerContainer maxRecords={20} showPagination={true} account={accountAddress} />
}
{!accountAddress && !address &&
<>
<Typography variant="h6" style={{marginBottom: 16, fontWeight: 400}}>
Please connect your wallet to view your assets
</Typography>
<Web3ModalButtonWagmi variant="outlined" overrideConnectText={"Connect Wallet"} darkMode={darkMode} hideNetworkSwitch={true}/>
</>
}
</GenericPageContainer>
</>
)
Expand Down

0 comments on commit db83c31

Please sign in to comment.