From 6b462504f655f985fbdd17e16aea2a7cb753fc14 Mon Sep 17 00:00:00 2001 From: Matti Nannt Date: Fri, 18 Aug 2023 16:05:12 +0200 Subject: [PATCH] Fix build errors in formbricks-com (#710) * Fix build errors in formbricks-com' * run pnpm format --- apps/formbricks-com/components/shared/Fence.jsx | 15 +++++---------- .../attributes/AttributeRowData.tsx | 6 +++--- .../attributes/AttributeTableHeading.tsx | 4 ++-- .../[environmentId]/EnvironmentsNavbar.tsx | 8 ++++++-- .../[environmentId]/integrations/page.tsx | 2 +- .../environments/[environmentId]/people/page.tsx | 8 ++++---- .../[environmentId]/surveys/PreviewSurvey.tsx | 4 ++-- .../[surveyId]/(analysis)/summary/CTASummary.tsx | 2 +- .../[surveyId]/(analysis)/summary/NPSSummary.tsx | 2 +- .../(analysis)/summary/OpenTextSummary.tsx | 2 +- .../(analysis)/summary/RatingSummary.tsx | 2 +- .../surveys/[surveyId]/edit/HowToSendCard.tsx | 4 +--- .../[surveyId]/edit/QuestionsSettingsTabs.tsx | 2 +- .../[surveyId]/edit/RecontactOptionsCard.tsx | 4 +--- .../[surveyId]/edit/ResponseOptionsCard.tsx | 4 +--- .../surveys/[surveyId]/edit/WhenToSendCard.tsx | 4 +--- .../surveys/[surveyId]/edit/WhoToSendCard.tsx | 4 +--- apps/web/app/s/[surveyId]/page.tsx | 6 ++++-- packages/js/src/components/CTAQuestion.tsx | 4 +--- 19 files changed, 38 insertions(+), 49 deletions(-) diff --git a/apps/formbricks-com/components/shared/Fence.jsx b/apps/formbricks-com/components/shared/Fence.jsx index b3befc495e..dab11c6b8e 100644 --- a/apps/formbricks-com/components/shared/Fence.jsx +++ b/apps/formbricks-com/components/shared/Fence.jsx @@ -1,14 +1,9 @@ -import { Fragment } from 'react' -import Highlight, { defaultProps } from 'prism-react-renderer' +import { Fragment } from "react"; +import { Highlight } from "prism-react-renderer"; export function Fence({ children, language }) { return ( - + {({ className, style, tokens, getTokenProps }) => (
           
@@ -19,12 +14,12 @@ export function Fence({ children, language }) {
                   .map((token, tokenIndex) => (
                     
                   ))}
-                {'\n'}
+                {"\n"}
               
             ))}
           
         
)}
- ) + ); } diff --git a/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/AttributeRowData.tsx b/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/AttributeRowData.tsx index ed185472ee..43a487bc3b 100644 --- a/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/AttributeRowData.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/AttributeRowData.tsx @@ -5,7 +5,7 @@ import { TagIcon } from "@heroicons/react/24/solid"; export default function AttributeClassDataRow({ attributeClass }) { return (
-
+
@@ -22,10 +22,10 @@ export default function AttributeClassDataRow({ attributeClass }) {
-
+
{timeSinceConditionally(attributeClass.createdAt.toString())}
-
+
{timeSinceConditionally(attributeClass.updatedAt.toString())}
diff --git a/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/AttributeTableHeading.tsx b/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/AttributeTableHeading.tsx index a09be2313c..7119df83fe 100644 --- a/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/AttributeTableHeading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/AttributeTableHeading.tsx @@ -3,8 +3,8 @@ export default function AttributeTableHeading() { <>
Name
-
Created
-
Last Updated
+
Created
+
Last Updated
); diff --git a/apps/web/app/(app)/environments/[environmentId]/EnvironmentsNavbar.tsx b/apps/web/app/(app)/environments/[environmentId]/EnvironmentsNavbar.tsx index 8deda994b7..0b29680e1c 100644 --- a/apps/web/app/(app)/environments/[environmentId]/EnvironmentsNavbar.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/EnvironmentsNavbar.tsx @@ -36,12 +36,16 @@ import { DashboardIcon, ErrorComponent, FilterIcon, - FormIcon, Popover, PopoverContent, PopoverTrigger, ProfileAvatar, + FormIcon, + Popover, + PopoverContent, + PopoverTrigger, + ProfileAvatar, SettingsIcon, Tooltip, TooltipContent, TooltipProvider, - TooltipTrigger + TooltipTrigger, } from "@formbricks/ui"; import { AdjustmentsVerticalIcon, diff --git a/apps/web/app/(app)/environments/[environmentId]/integrations/page.tsx b/apps/web/app/(app)/environments/[environmentId]/integrations/page.tsx index a27ecd708b..3a2a5b36a5 100644 --- a/apps/web/app/(app)/environments/[environmentId]/integrations/page.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/integrations/page.tsx @@ -9,7 +9,7 @@ export default function IntegrationsPage({ params }) {

Integrations

Connect Formbricks with your favorite tools.

-
+
User
-
User ID
-
Email
+
User ID
+
Email
{people.map((person) => (
-
+
{truncateMiddle(getAttributeValue(person, "userId"), 24)}
-
+
{getAttributeValue(person, "email")}
diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/PreviewSurvey.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/PreviewSurvey.tsx index 310732b295..72327aa1db 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/PreviewSurvey.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/PreviewSurvey.tsx @@ -451,7 +451,7 @@ export default function PreviewSurvey({ ) : (
-
+
Restart diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/CTASummary.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/CTASummary.tsx index 8e2fcb6868..076c2a7eb3 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/CTASummary.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/CTASummary.tsx @@ -28,7 +28,7 @@ export default function CTASummary({ questionSummary }: CTASummaryProps) {
-

+

{questionSummary.question.headline}

diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/NPSSummary.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/NPSSummary.tsx index 7aa49a9c1f..9bf94ce3e2 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/NPSSummary.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/NPSSummary.tsx @@ -76,7 +76,7 @@ export default function NPSSummary({ questionSummary }: NPSSummaryProps) {
-

+

{questionSummary.question.headline}

diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/OpenTextSummary.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/OpenTextSummary.tsx index a5a8b6f3a5..12f290845d 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/OpenTextSummary.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/OpenTextSummary.tsx @@ -20,7 +20,7 @@ export default function OpenTextSummary({ questionSummary, environmentId }: Open
-

+

{questionSummary.question.headline}

diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/RatingSummary.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/RatingSummary.tsx index 8e0bbd0795..28d796f76f 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/RatingSummary.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/RatingSummary.tsx @@ -77,7 +77,7 @@ export default function RatingSummary({ questionSummary }: RatingSummaryProps) {
-

+

{questionSummary.question.headline}

diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/HowToSendCard.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/HowToSendCard.tsx index 8ca906bb52..ea7705e935 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/HowToSendCard.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/HowToSendCard.tsx @@ -94,9 +94,7 @@ export default function HowToSendCard({ localSurvey, setLocalSurvey, environment

How to ask

-

- In-app survey, link survey or email survey. -

+

In-app survey, link survey or email survey.

diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/QuestionsSettingsTabs.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/QuestionsSettingsTabs.tsx index fa1c94d183..196c406102 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/QuestionsSettingsTabs.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/QuestionsSettingsTabs.tsx @@ -27,7 +27,7 @@ interface QuestionsAudienceTabsProps { export default function QuestionsAudienceTabs({ activeId, setActiveId }: QuestionsAudienceTabsProps) { return ( -
+
diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/WhenToSendCard.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/WhenToSendCard.tsx index ef8a940f01..798c5a5545 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/WhenToSendCard.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/WhenToSendCard.tsx @@ -142,9 +142,7 @@ export default function WhenToSendCard({ environmentId, localSurvey, setLocalSur

Survey Trigger

-

- Choose the actions which trigger the survey. -

+

Choose the actions which trigger the survey.

{localSurvey.type === "link" && (
diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/WhoToSendCard.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/WhoToSendCard.tsx index 6162932c5a..0f7047594f 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/WhoToSendCard.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/WhoToSendCard.tsx @@ -106,9 +106,7 @@ export default function WhoToSendCard({ environmentId, localSurvey, setLocalSurv

Target Audience

-

- Pre-segment your users with attributes filters. -

+

Pre-segment your users with attributes filters.

{localSurvey.type === "link" && (
diff --git a/apps/web/app/s/[surveyId]/page.tsx b/apps/web/app/s/[surveyId]/page.tsx index 3b94350803..f786588505 100644 --- a/apps/web/app/s/[surveyId]/page.tsx +++ b/apps/web/app/s/[surveyId]/page.tsx @@ -8,8 +8,10 @@ import { getProductByEnvironmentId } from "@formbricks/lib/services/product"; import SurveyInactive from "@/app/s/[surveyId]/SurveyInactive"; export default async function LinkSurveyPage({ params }) { - - const [survey, product] = await Promise.all([getSurvey(params.surveyId), getProductByEnvironmentId(params.environmentId)]); + const [survey, product] = await Promise.all([ + getSurvey(params.surveyId), + getProductByEnvironmentId(params.environmentId), + ]); if (survey && survey.status !== "inProgress") { return ; diff --git a/packages/js/src/components/CTAQuestion.tsx b/packages/js/src/components/CTAQuestion.tsx index f990fb2189..0ad5d46da3 100644 --- a/packages/js/src/components/CTAQuestion.tsx +++ b/packages/js/src/components/CTAQuestion.tsx @@ -31,9 +31,7 @@ export default function CTAQuestion({
-
- {goToPreviousQuestion && goToPreviousQuestion()} />} -
+
{goToPreviousQuestion && goToPreviousQuestion()} />}
{(!question.required || storedResponseValue) && (