mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-23 21:59:28 -05:00
feat: allow remove branding of in app surveys (#2085)
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
This commit is contained in:
+1
-10
@@ -15,7 +15,6 @@ interface EditFormbricksBrandingProps {
|
||||
product: TProduct;
|
||||
canRemoveBranding: boolean;
|
||||
environmentId: string;
|
||||
isFormbricksCloud?: boolean;
|
||||
}
|
||||
|
||||
export function EditFormbricksBranding({
|
||||
@@ -23,7 +22,6 @@ export function EditFormbricksBranding({
|
||||
product,
|
||||
canRemoveBranding,
|
||||
environmentId,
|
||||
isFormbricksCloud,
|
||||
}: EditFormbricksBrandingProps) {
|
||||
const [isBrandingEnabled, setIsBrandingEnabled] = useState(
|
||||
type === "linkSurvey" ? product.linkSurveyBranding : product.inAppSurveyBranding
|
||||
@@ -71,14 +69,7 @@ export function EditFormbricksBranding({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{type !== "linkSurvey" && !isFormbricksCloud && (
|
||||
<UpgradePlanNotice
|
||||
message="To remove the Formbricks branding from In-App Surveys, please"
|
||||
textForUrl="request an Enterprise license."
|
||||
url="https://formbricks.com/docs/self-hosting/enterprise"
|
||||
/>
|
||||
)}
|
||||
{type !== "linkSurvey" && isFormbricksCloud && (
|
||||
{type !== "linkSurvey" && (
|
||||
<UpgradePlanNotice
|
||||
message="To remove the Formbricks branding from In-app Surveys, please"
|
||||
textForUrl="upgrade your plan."
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
getRemoveLinkBrandingPermission,
|
||||
} from "@formbricks/ee/lib/service";
|
||||
import { authOptions } from "@formbricks/lib/authOptions";
|
||||
import { DEFAULT_BRAND_COLOR, IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants";
|
||||
import { DEFAULT_BRAND_COLOR } from "@formbricks/lib/constants";
|
||||
import { getMembershipByUserIdTeamId } from "@formbricks/lib/membership/service";
|
||||
import { getAccessFlags } from "@formbricks/lib/membership/utils";
|
||||
import { getProductByEnvironmentId } from "@formbricks/lib/product/service";
|
||||
@@ -86,7 +86,6 @@ export default async function ProfileSettingsPage({ params }: { params: { enviro
|
||||
product={product}
|
||||
canRemoveBranding={canRemoveInAppBranding}
|
||||
environmentId={params.environmentId}
|
||||
isFormbricksCloud={IS_FORMBRICKS_CLOUD}
|
||||
/>
|
||||
</SettingsCard>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -209,7 +209,7 @@ export default function PreviewSurvey({
|
||||
survey={survey}
|
||||
brandColor={brandColor}
|
||||
activeQuestionId={activeQuestionId || undefined}
|
||||
isBrandingEnabled={product.linkSurveyBranding}
|
||||
isBrandingEnabled={product.inAppSurveyBranding}
|
||||
onActiveQuestionChange={setActiveQuestionId}
|
||||
isRedirectDisabled={true}
|
||||
onFileUpload={onFileUpload}
|
||||
@@ -278,7 +278,7 @@ export default function PreviewSurvey({
|
||||
survey={survey}
|
||||
brandColor={brandColor}
|
||||
activeQuestionId={activeQuestionId || undefined}
|
||||
isBrandingEnabled={product.linkSurveyBranding}
|
||||
isBrandingEnabled={product.inAppSurveyBranding}
|
||||
onActiveQuestionChange={setActiveQuestionId}
|
||||
isRedirectDisabled={true}
|
||||
onFileUpload={onFileUpload}
|
||||
|
||||
Reference in New Issue
Block a user