From b86f837e78c90acadf3b89d384d88ecd81b09e5b Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 30 Jun 2023 17:12:59 +0200 Subject: [PATCH] fix response card not visible --- .../[surveyId]/edit/ResponseOptionsCard.tsx | 47 ++++++++++--------- .../{AudienceView.tsx => SettingsView.tsx} | 8 ++-- .../surveys/[surveyId]/edit/SurveyEditor.tsx | 4 +- 3 files changed, 30 insertions(+), 29 deletions(-) rename apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/{AudienceView.tsx => SettingsView.tsx} (79%) diff --git a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/ResponseOptionsCard.tsx b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/ResponseOptionsCard.tsx index 0a87863d07..fa78465fc4 100644 --- a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/ResponseOptionsCard.tsx +++ b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/ResponseOptionsCard.tsx @@ -1,5 +1,6 @@ "use client"; +import SurveyEditor from "@/app/environments/[environmentId]/surveys/[surveyId]/edit/SurveyEditor"; import type { Survey } from "@formbricks/types/surveys"; import { Input, Label, Switch } from "@formbricks/ui"; import { CheckCircleIcon } from "@heroicons/react/24/solid"; @@ -112,29 +113,31 @@ export default function ResponseOptionsCard({ localSurvey, setLocalSurvey }: Res )} -
-
- - + {localSurvey.type === "link" && ( +
+
+ + +
+
+ {redirectToggle && ( + handleRedirectUrlChange(e.target.value)} + /> + )} +
-
- {redirectToggle && ( - handleRedirectUrlChange(e.target.value)} - /> - )} -
-
+ )}
diff --git a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/AudienceView.tsx b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/SettingsView.tsx similarity index 79% rename from apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/AudienceView.tsx rename to apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/SettingsView.tsx index 4a5759ab0b..9d96432cf1 100644 --- a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/AudienceView.tsx +++ b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/SettingsView.tsx @@ -5,13 +5,13 @@ import ResponseOptionsCard from "./ResponseOptionsCard"; import WhenToSendCard from "./WhenToSendCard"; import WhoToSendCard from "./WhoToSendCard"; -interface AudienceViewProps { +interface SettingsViewProps { environmentId: string; localSurvey: Survey; setLocalSurvey: (survey: Survey) => void; } -export default function AudienceView({ environmentId, localSurvey, setLocalSurvey }: AudienceViewProps) { +export default function SettingsView({ environmentId, localSurvey, setLocalSurvey }: SettingsViewProps) { return (
- {localSurvey.type === "link" && ( - - )} + ) : ( -