Skip to content

Commit

Permalink
Merge pull request #1954 from Web3Auth/feat/logo-fix
Browse files Browse the repository at this point in the history
Desktop logo fix
  • Loading branch information
chaitanyapotti authored Sep 20, 2024
2 parents ecb93e6 + a4973e9 commit 05f275d
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ export default function ExternalWalletInstall(props: ExternalWalletInstallProps)
const { connectButton, goBack, closeModal } = props;
const [t] = useTranslation(undefined, { i18n });

const deviceDetails = useMemo<{ platform: platform; browser: browser; os: mobileOs; logoLight: string; logoDark: string }>(() => {
const deviceDetails = useMemo<{ platform: platform; browser: browser; os: mobileOs }>(() => {
const browser = Bowser.getParser(window.navigator.userAgent);
return {
platform: browser.getPlatformType() as platform,
browser: browser.getBrowserName().toLowerCase() as browser,
os: browser.getOSName() as mobileOs,
logoLight: `${browser.getBrowserName().toLowerCase()}-light`,
logoDark: `${browser.getBrowserName().toLowerCase()}-dark`,
};
}, []);

Expand Down Expand Up @@ -120,10 +118,10 @@ export default function ExternalWalletInstall(props: ExternalWalletInstallProps)
<a href={browserExtensionUrl} rel="noopener noreferrer" target="_blank">
<Button type="button" variant="tertiary" className="w-full !justify-start flex items-center gap-2 wallet-link-btn">
<Image
imageId={deviceDetails.logoLight}
darkImageId={deviceDetails.logoDark}
hoverImageId={deviceDetails.logoLight}
darkHoverImageId={deviceDetails.logoDark}
imageId={deviceDetails.browser}
darkImageId={deviceDetails.browser}
hoverImageId={deviceDetails.browser}
darkHoverImageId={deviceDetails.browser}
height="30"
width="30"
isButton
Expand Down

0 comments on commit 05f275d

Please sign in to comment.