You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
2.6 KiB
91 lines
2.6 KiB
3 years ago
|
import React from 'react';
|
||
|
import PropTypes from 'prop-types';
|
||
|
import Box from '../../ui/box';
|
||
|
import Button from '../../ui/button';
|
||
|
import Typography from '../../ui/typography/typography';
|
||
3 years ago
|
import NewCollectiblesNotice from '../new-collectibles-notice';
|
||
3 years ago
|
import CollectiblesItems from '../collectibles-items';
|
||
3 years ago
|
import {
|
||
|
COLORS,
|
||
|
TYPOGRAPHY,
|
||
|
TEXT_ALIGN,
|
||
|
JUSTIFY_CONTENT,
|
||
|
FLEX_DIRECTION,
|
||
3 years ago
|
FONT_WEIGHT,
|
||
3 years ago
|
} from '../../../helpers/constants/design-system';
|
||
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||
|
|
||
3 years ago
|
export default function CollectiblesTab({ onAddNFT }) {
|
||
3 years ago
|
const collectibles = [];
|
||
3 years ago
|
const newNFTsDetected = false;
|
||
3 years ago
|
const t = useI18nContext();
|
||
|
|
||
|
return (
|
||
3 years ago
|
<div className="collectibles-tab">
|
||
3 years ago
|
{collectibles.length > 0 ? (
|
||
3 years ago
|
<CollectiblesItems
|
||
|
onAddNFT={onAddNFT}
|
||
|
onRefreshList={() => {
|
||
|
console.log('refreshing collectibles');
|
||
|
}}
|
||
|
/>
|
||
3 years ago
|
) : (
|
||
3 years ago
|
<Box padding={[6, 12, 6, 12]}>
|
||
|
{newNFTsDetected ? <NewCollectiblesNotice /> : null}
|
||
3 years ago
|
<Box justifyContent={JUSTIFY_CONTENT.CENTER}>
|
||
3 years ago
|
<img src="./images/no-nfts.svg" />
|
||
3 years ago
|
</Box>
|
||
3 years ago
|
<Box
|
||
|
marginTop={4}
|
||
|
marginBottom={12}
|
||
|
justifyContent={JUSTIFY_CONTENT.CENTER}
|
||
|
flexDirection={FLEX_DIRECTION.COLUMN}
|
||
3 years ago
|
>
|
||
3 years ago
|
<Typography
|
||
|
color={COLORS.UI3}
|
||
|
variant={TYPOGRAPHY.H4}
|
||
|
align={TEXT_ALIGN.CENTER}
|
||
|
fontWeight={FONT_WEIGHT.BOLD}
|
||
|
>
|
||
|
{t('noNFTs')}
|
||
|
</Typography>
|
||
3 years ago
|
<Button
|
||
|
type="link"
|
||
3 years ago
|
target="_blank"
|
||
3 years ago
|
rel="noopener noreferrer"
|
||
3 years ago
|
href="https://metamask.zendesk.com/hc/en-us/articles/360058238591-NFT-tokens-in-MetaMask-wallet"
|
||
|
style={{ padding: 0, fontSize: '1rem' }}
|
||
3 years ago
|
>
|
||
|
{t('learnMore')}
|
||
|
</Button>
|
||
|
</Box>
|
||
3 years ago
|
<Box
|
||
|
marginBottom={4}
|
||
|
justifyContent={JUSTIFY_CONTENT.CENTER}
|
||
|
flexDirection={FLEX_DIRECTION.COLUMN}
|
||
|
>
|
||
|
<Typography
|
||
|
color={COLORS.UI3}
|
||
|
variant={TYPOGRAPHY.H5}
|
||
|
align={TEXT_ALIGN.CENTER}
|
||
|
>
|
||
|
{t('missingNFT')}
|
||
|
</Typography>
|
||
|
<Button
|
||
|
type="link"
|
||
|
onClick={onAddNFT}
|
||
|
style={{ padding: 0, fontSize: '1rem' }}
|
||
|
>
|
||
|
{t('addNFT')}
|
||
|
</Button>
|
||
|
</Box>
|
||
3 years ago
|
</Box>
|
||
|
)}
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
3 years ago
|
CollectiblesTab.propTypes = {
|
||
3 years ago
|
onAddNFT: PropTypes.func.isRequired,
|
||
|
};
|