diff --git a/src/components/connect-button.tsx b/src/components/connect-button.tsx index 7b2ceed8f6..137d9186f3 100644 --- a/src/components/connect-button.tsx +++ b/src/components/connect-button.tsx @@ -4,9 +4,9 @@ import { Button } from '@site/src/ui/design-system/src/lib/Components/Button'; import { useIsMobile } from '@site/src/hooks/use-is-mobile'; import Dropdown from '@site/src/ui/design-system/src/lib/Components/Dropdown'; -const shortenAddress = (address: string, isMobile: boolean) => { +const shortenAddress = (address: string) => { if (!address) return ''; - return isMobile ? `${address.slice(0, 4)}...${address.slice(-3)}` : address; + return `${address.slice(0, 8)}...${address.slice(-3)}`; }; const ConnectButton: React.FC = () => { @@ -26,9 +26,13 @@ const ConnectButton: React.FC = () => { ]; const fullAddress = user.addr ?? 'Unknown'; - const displayAddress = shortenAddress(fullAddress, isMobile); + const displayAddress = shortenAddress(fullAddress); - return ; + return ( +
+ +
+ ); }; export default ConnectButton; diff --git a/src/css/custom.css b/src/css/custom.css index 4bf5b9062b..c04f91b27d 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -120,4 +120,11 @@ width: 300px; display: block; margin: 0 auto; +} + +/* Only hide in in nav (not main menu on mobile) */ +@media (max-width: 960px) { + .navbar__items--right .hide-connect-on-mobile { + display: none !important; + } } \ No newline at end of file