mirror of
https://github.com/formbricks/formbricks.git
synced 2026-03-13 11:09:29 -05:00
fix: removed logo from survey loading if branding is disabled (#4542)
This commit is contained in:
committed by
GitHub
parent
838fe16845
commit
1c1ef56e00
@@ -226,7 +226,8 @@ export const LinkSurvey = ({
|
||||
webAppUrl={webAppUrl}
|
||||
IS_FORMBRICKS_CLOUD={IS_FORMBRICKS_CLOUD}
|
||||
IMPRINT_URL={IMPRINT_URL}
|
||||
PRIVACY_URL={PRIVACY_URL}>
|
||||
PRIVACY_URL={PRIVACY_URL}
|
||||
isBrandingEnabled={project.linkSurveyBranding}>
|
||||
<SurveyInline
|
||||
survey={survey}
|
||||
styling={determineStyling()}
|
||||
|
||||
@@ -20,6 +20,7 @@ interface LinkSurveyWrapperProps {
|
||||
PRIVACY_URL?: string;
|
||||
IS_FORMBRICKS_CLOUD: boolean;
|
||||
webAppUrl: string;
|
||||
isBrandingEnabled: boolean;
|
||||
}
|
||||
|
||||
export const LinkSurveyWrapper = ({
|
||||
@@ -34,6 +35,7 @@ export const LinkSurveyWrapper = ({
|
||||
PRIVACY_URL,
|
||||
IS_FORMBRICKS_CLOUD,
|
||||
webAppUrl,
|
||||
isBrandingEnabled,
|
||||
}: LinkSurveyWrapperProps) => {
|
||||
//for embedded survey strip away all surrounding css
|
||||
const [isBackgroundLoaded, setIsBackgroundLoaded] = useState(false);
|
||||
@@ -52,14 +54,18 @@ export const LinkSurveyWrapper = ({
|
||||
styling.cardArrangement?.linkSurveys === "straight" && "pt-6",
|
||||
styling.cardArrangement?.linkSurveys === "casual" && "px-6 py-10"
|
||||
)}>
|
||||
<SurveyLoadingAnimation survey={survey} />
|
||||
<SurveyLoadingAnimation survey={survey} isBrandingEnabled={isBrandingEnabled} />
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
else
|
||||
return (
|
||||
<div>
|
||||
<SurveyLoadingAnimation survey={survey} isBackgroundLoaded={isBackgroundLoaded} />
|
||||
<SurveyLoadingAnimation
|
||||
survey={survey}
|
||||
isBackgroundLoaded={isBackgroundLoaded}
|
||||
isBrandingEnabled={isBrandingEnabled}
|
||||
/>
|
||||
<MediaBackground survey={survey} project={project} onBackgroundLoaded={handleBackgroundLoaded}>
|
||||
<div className="flex max-h-dvh min-h-dvh items-end justify-center overflow-clip sm:items-center">
|
||||
{!styling.isLogoHidden && project.logo?.url && <ClientLogo project={project} />}
|
||||
|
||||
@@ -8,11 +8,13 @@ import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
interface SurveyLoadingAnimationProps {
|
||||
survey: TSurvey;
|
||||
isBackgroundLoaded?: boolean;
|
||||
isBrandingEnabled: boolean;
|
||||
}
|
||||
|
||||
export const SurveyLoadingAnimation = ({
|
||||
survey,
|
||||
isBackgroundLoaded = true,
|
||||
isBrandingEnabled,
|
||||
}: SurveyLoadingAnimationProps) => {
|
||||
const [isHidden, setIsHidden] = useState(false);
|
||||
const [minTimePassed, setMinTimePassed] = useState(false);
|
||||
@@ -118,7 +120,9 @@ export const SurveyLoadingAnimation = ({
|
||||
"flex flex-col items-center space-y-4",
|
||||
isReadyToTransition ? "animate-surveyExit" : "animate-surveyLoading"
|
||||
)}>
|
||||
<Image src={Logo} alt="Logo" className={cn("w-32 transition-all duration-1000 md:w-40")} />
|
||||
{isBrandingEnabled && (
|
||||
<Image src={Logo} alt="Logo" className={cn("w-32 transition-all duration-1000 md:w-40")} />
|
||||
)}
|
||||
<LoadingSpinner />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user