Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix web3auth logo bg issue #1828

Merged
merged 1 commit into from
May 28, 2024
Merged

Fix web3auth logo bg issue #1828

merged 1 commit into from
May 28, 2024

Conversation

BboyStatix
Copy link
Contributor

@BboyStatix BboyStatix commented May 23, 2024

Ticket Link

https://toruslabs.atlassian.net/browse/PD-3527

What does this PR do?

Screenshot 2024-05-23 at 12 54 46 PM Fixes the above web3auth logo background issue in modal sdk

It basically just removes the background entirely
Screenshot 2024-05-23 at 12 48 17 PM
Screenshot 2024-05-23 at 12 53 43 PM

@BboyStatix BboyStatix requested a review from yashovardhan May 23, 2024 04:58
@BboyStatix BboyStatix self-assigned this May 23, 2024
@BboyStatix
Copy link
Contributor Author

@yashovardhan Should I update the default logo url in the SDK as well?
E.g. currently the constants have the following values

export const DEFAULT_LOGO_LIGHT = "https://images.web3auth.io/web3auth-logo-w.svg"; // logo used on light mode
export const DEFAULT_LOGO_DARK = "https://images.web3auth.io/web3auth-logo-w-light.svg"; // logo used on dark mode

Another thing to note is that because these constants have not been updated that means if you specified the new logo urls (e.g. https://web3auth.io/images/web3authlog.png and https://web3auth.io/images/web3authlogodark.png) this condition inside Header.tsx
const headerLogo = [DEFAULT_LOGO_DARK, DEFAULT_LOGO_LIGHT].includes(appLogo) ? "" : appLogo;
would not work as it still holds the old values and thus instead of header logo being hidden for default logo url it gets shown.

@BboyStatix BboyStatix requested a review from chaitanyapotti May 28, 2024 02:21
@@ -23,7 +23,6 @@ export default function DetailedLoader(props: DetailedLoaderProps) {
const { adapter, appLogo, message, modalStatus, adapterName, onClose } = props;
const providerIcon = adapter === "twitter" ? <Image imageId="login-x-dark" /> : <Image imageId={`login-${adapter}`} />;
const [t] = useTranslation(undefined, { i18n });
const isDefaultLogo = [DEFAULT_LOGO_DARK, DEFAULT_LOGO_LIGHT].includes(appLogo);
Copy link
Contributor Author

@BboyStatix BboyStatix May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer assign a different background based on default logo or not. So all logos are treated the same now. So no need to check if the logo is a default logo or not anymore. Besides, appLogo is set to default values in constructor

if (!uiConfig.logoLight) this.uiConfig.logoLight = DEFAULT_LOGO_LIGHT;

Copy link
Member

@chaitanyapotti chaitanyapotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chaitanyapotti chaitanyapotti merged commit 7b0f6ea into master May 28, 2024
2 checks passed
@chaitanyapotti chaitanyapotti deleted the feat/web3auth-logo branch May 28, 2024 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants