Skip to content

Commit

Permalink
removes "show more"
Browse files Browse the repository at this point in the history
  • Loading branch information
walt-1 committed Aug 6, 2024
1 parent 7c26860 commit 1f8d55b
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/layouts/WalletsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const WalletsModal: FC = () => {
const breakpoint = useBreakPoint()
const isMobile = breakpoint.isMobile || breakpoint.isTablet
const [hasRequestedConnect, setHasRequestedConnect] = useBoolean(false)
const [showAll, setShowAll] = useBoolean(false)

useEffect(() => {
if (visible && !termsOfServiceVisible && !existingUserCache.hasSignedTC) {
Expand Down Expand Up @@ -81,11 +80,10 @@ export const WalletsModal: FC = () => {
readyState !== WalletReadyState.Unsupported && readyState !== WalletReadyState.Installed
)
.map((w) => ({ ...w, detected: false }))
console.log({detectedWallets})

return [...detectedWallets, ...undetectedWallets]
}, [wallets])
const subsetWallets = showAll ? renderWallets :
renderWallets.slice(0, Math.min(4,renderWallets.length))

return !existingUserCache.hasSignedTC && termsOfServiceVisible ? (
<TermsOfService setVisible={setTermsOfServiceVisible} visible={termsOfServiceVisible} />
) : (
Expand All @@ -104,7 +102,7 @@ export const WalletsModal: FC = () => {
<DialogCloseDefault className={'top-0 ring-0 focus-visible:ring-offset-0 focus-visible:ring-0'} />
</DialogHeader>
<DialogBody className={'flex-col p-2 overflow-scroll gap-3.75'}>
{subsetWallets.map((wallet, index) => (
{renderWallets.map((wallet, index) => (
<Button
key={index}
isLoading={connecting && wallet.adapter.name === selectedWallet}
Expand Down Expand Up @@ -139,12 +137,6 @@ export const WalletsModal: FC = () => {
{wallet.detected && <span className="text-green-4 pr-5 font-poppins text-tiny">Detected</span>}
</Button>
))}
{!showAll && renderWallets.length > 4 && <Button
variant={'outline'}
colorScheme={'purple'}
onClick={setShowAll.on}
className={'w-max mx-auto'}
>Show All</Button>}
</DialogBody>
</DialogContent>
</Dialog>
Expand Down

0 comments on commit 1f8d55b

Please sign in to comment.