-
Notifications
You must be signed in to change notification settings - Fork 1k
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: hide logo in branded link surveys #2412
Conversation
Thank you for following the naming conventions for pull request titles! 🙏 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
@@ -181,7 +181,9 @@ export default function LinkSurvey({ | |||
|
|||
return ( | |||
<div className="flex h-screen items-center justify-center"> | |||
{!determineStyling().isLogoHidden && product.logo?.url && <ClientLogo product={product} />} | |||
{product.logo?.url && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have one check here anyways so let's keep all the "can and should we show the logo" here on this layer instead of passing it down.
@@ -181,7 +181,9 @@ export default function LinkSurvey({ | |||
|
|||
return ( | |||
<div className="flex h-screen items-center justify-center"> | |||
{!determineStyling().isLogoHidden && product.logo?.url && <ClientLogo product={product} />} | |||
{product.logo?.url && ( | |||
<ClientLogo product={product} isLogoHidden={determineStyling().isLogoHidden ?? true} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this logic doesn't play out right. It should only be hidden if it is clearly set to hidden and not vice versa. If anything, it should be "?? false" so that it only gets hidden, when its definitely set to hidden?
Not entirely sure, havent worked with "??" yet but have a look at this video:
bug-logo.mp4
environmentId={environment.id} | ||
product={product} | ||
previewSurvey | ||
isLogoHidden={styling.isLogoHidden ?? false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see, here you work with ?? false, which makes more sense to me
environmentId={environment.id} | ||
product={product} | ||
previewSurvey | ||
isLogoHidden={styling.isLogoHidden ?? true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true vs false???
…shubham/fix-hide-logo-toggle-in-link-surveys
What does this PR do?
Hide Logo Toggle Fix + Introduce prop in component for the hideLogo
Fixes # (issue)
How should this be tested?
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated