diff --git a/apps/formbricks-com/components/dummyUI/DemoPreview.tsx b/apps/formbricks-com/components/dummyUI/DemoPreview.tsx index 91962b52fe..4c2f07ba91 100644 --- a/apps/formbricks-com/components/dummyUI/DemoPreview.tsx +++ b/apps/formbricks-com/components/dummyUI/DemoPreview.tsx @@ -28,7 +28,7 @@ const DemoPreview: React.FC = ({ template }) => {

Preview

-
+
{selectedTemplate && ( {

- {/* Product Hunt Logo */} + {/* Product Hunt Logo */}
diff --git a/apps/formbricks-com/components/shared/MdxTryItCTA.tsx b/apps/formbricks-com/components/shared/MdxTryItCTA.tsx index 963b41ec05..10d906ecde 100644 --- a/apps/formbricks-com/components/shared/MdxTryItCTA.tsx +++ b/apps/formbricks-com/components/shared/MdxTryItCTA.tsx @@ -7,7 +7,7 @@ export default function HeadingCentered() { const router = useRouter(); return (
-
+

What are you waiting for?

diff --git a/apps/formbricks-com/components/shared/TryItCTA.tsx b/apps/formbricks-com/components/shared/TryItCTA.tsx index 80a1e6d7e6..fa3cbbec3f 100644 --- a/apps/formbricks-com/components/shared/TryItCTA.tsx +++ b/apps/formbricks-com/components/shared/TryItCTA.tsx @@ -7,7 +7,7 @@ export default function HeadingCentered() { const router = useRouter(); return (
-
+

What are you waiting for?

diff --git a/apps/formbricks-com/pages/community/LayoutTribe.tsx b/apps/formbricks-com/pages/community/LayoutTribe.tsx index 10075658d9..dc7a786927 100644 --- a/apps/formbricks-com/pages/community/LayoutTribe.tsx +++ b/apps/formbricks-com/pages/community/LayoutTribe.tsx @@ -13,7 +13,7 @@ export default function Layout({ title, description, children }: LayoutProps) {
-
{children}
+
{children}
); diff --git a/apps/formbricks-com/pages/community/index.tsx b/apps/formbricks-com/pages/community/index.tsx index 05d73208e8..c3a32958fc 100644 --- a/apps/formbricks-com/pages/community/index.tsx +++ b/apps/formbricks-com/pages/community/index.tsx @@ -562,15 +562,15 @@ export default function FormTribeHackathon() {

+ Sticker Set

- rookie batch + rookie batch

+ Hoodie

- rookie batch + rookie batch

+ Handmade Gift

- rookie batch + rookie batch
@@ -754,7 +754,7 @@ export default function FormTribeHackathon() {
{FAQ.map((question) => ( -
+

{question.question}

{question.answer}

diff --git a/apps/formbricks-com/pages/open-source-form-builder/index.tsx b/apps/formbricks-com/pages/open-source-form-builder/index.tsx index 92a855748b..3a78bf7f3e 100644 --- a/apps/formbricks-com/pages/open-source-form-builder/index.tsx +++ b/apps/formbricks-com/pages/open-source-form-builder/index.tsx @@ -415,7 +415,7 @@ export default function LinkSurveyPage() { headline="Try THE open source form builder 💪" subheadline="Convinced that Formbricks is a good open source Typeform alternative? Try it now!" /> -
+
-
+
{allQuestionTypes.map((feature) => { diff --git a/apps/formbricks-com/pages/website-survey/index.tsx b/apps/formbricks-com/pages/website-survey/index.tsx index 34ddc27763..100571fe76 100644 --- a/apps/formbricks-com/pages/website-survey/index.tsx +++ b/apps/formbricks-com/pages/website-survey/index.tsx @@ -266,7 +266,7 @@ export default function WebsiteSurveyPage() { headline="All clear? Run your first website survey 👉" subheadline="Targeted website surveys, all privacy-first. Run professional research without compromising data privacy." /> -
+
diff --git a/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/components/AttributeSettingsTab.tsx b/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/components/AttributeSettingsTab.tsx index 24759362a3..84615b9f5d 100644 --- a/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/components/AttributeSettingsTab.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/components/AttributeSettingsTab.tsx @@ -41,7 +41,7 @@ export default function AttributeSettingsTab({ attributeClass, setOpen }: Attrib return (
-
+
-
+
-

{truncate(product!.name, 20)}

+

{truncate(product!.name, 20)}

{!widgetSetupCompleted && ( diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/api-keys/components/EditApiKeys.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/api-keys/components/EditApiKeys.tsx index e1fb5a2a9b..d097e88ea2 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/api-keys/components/EditApiKeys.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/api-keys/components/EditApiKeys.tsx @@ -96,7 +96,7 @@ export default function EditAPIKeys({
Label
API Key
Created at
-
+
{apiKeysLocal && apiKeysLocal.length === 0 ? ( diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/notifications/components/EditAlerts.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/notifications/components/EditAlerts.tsx index cdf721d141..98a4226425 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/notifications/components/EditAlerts.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/notifications/components/EditAlerts.tsx @@ -52,7 +52,7 @@ export default function EditAlerts({
- Every Response + Every Response
diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/ShareEmbedSurvey.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/ShareEmbedSurvey.tsx index 5bdc37fb5d..87c8dd500f 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/ShareEmbedSurvey.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/ShareEmbedSurvey.tsx @@ -124,7 +124,7 @@ export const ShareEmbedSurvey = ({ survey, open, setOpen, webAppUrl, user }: Sha ))}
-
+
{activeId === "email" ? ( ) : activeId === "webpage" ? ( diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/EmailTab.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/EmailTab.tsx index 3e0f38e0ae..03ff9a95f0 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/EmailTab.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/EmailTab.tsx @@ -107,7 +107,7 @@ export default function EmailTab({ surveyId, email }: EmailTabProps) {
-
+
To : {email || "user@mail.com"}
Subject : Formbricks Email Survey Preview diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/LinkTab.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/LinkTab.tsx index 07f51ee4be..a60d6e0986 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/LinkTab.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/LinkTab.tsx @@ -61,7 +61,7 @@ export default function LinkTab({ survey, webAppUrl, surveyUrl, setSurveyUrl }: ))}
-
+

Survey link got too long? Shorten it!

diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/WebpageTab.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/WebpageTab.tsx index 1cc0a094f3..774f425c55 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/WebpageTab.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/shareEmbedTabs/WebpageTab.tsx @@ -17,7 +17,7 @@ export default function WebpageTab({ surveyUrl }) { return (
-
+
@@ -195,14 +196,15 @@ export const MatrixQuestionForm = ({
))}
diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/components/RecontactOptionsCard.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/components/RecontactOptionsCard.tsx index 12a2a2269b..311615681a 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/components/RecontactOptionsCard.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/edit/components/RecontactOptionsCard.tsx @@ -127,7 +127,7 @@ export default function RecontactOptionsCard({ id={option.name} className="aria-checked:border-brand-dark mx-5 disabled:border-slate-400 aria-checked:border-2" /> -
+

{option.name}

{option.description}

@@ -188,7 +188,7 @@ export default function RecontactOptionsCard({ id="newDays" className="aria-checked:border-brand-dark mx-4 disabled:border-slate-400 aria-checked:border-2" /> -
+

Wait -

+

Wait

-
+
{activeTab === "npm" ? (
diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 8c3c21ad16..cdc98b3769 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -15,7 +15,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }) return ( {process.env.VERCEL === "1" && } - {children} + {children} ); } diff --git a/apps/web/app/s/[surveyId]/components/LinkSurvey.tsx b/apps/web/app/s/[surveyId]/components/LinkSurvey.tsx index fe378581db..8e5605c6f9 100644 --- a/apps/web/app/s/[surveyId]/components/LinkSurvey.tsx +++ b/apps/web/app/s/[surveyId]/components/LinkSurvey.tsx @@ -118,9 +118,9 @@ export default function LinkSurvey({ setAutofocus(true); } // For safari on mobile devices, scroll is a bit off due to dynamic height of address bar, so on inital load, we scroll to the bottom - window.scrollTo({ - top: document.body.scrollHeight, - }); + // window.scrollTo({ + // top: document.body.scrollHeight, + // }); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -185,7 +185,7 @@ export default function LinkSurvey({ }; return ( -
+
{!determineStyling().isLogoHidden && product.logo?.url && } {isPreview && ( diff --git a/apps/web/app/s/[surveyId]/components/MediaBackground.tsx b/apps/web/app/s/[surveyId]/components/MediaBackground.tsx index 7fa03d7a70..b3bcf63a86 100644 --- a/apps/web/app/s/[surveyId]/components/MediaBackground.tsx +++ b/apps/web/app/s/[surveyId]/components/MediaBackground.tsx @@ -116,28 +116,25 @@ export const MediaBackground: React.FC = ({
-
-
- {authorDetailsForUnsplash.authorName && ( -
- Photo by - - {authorDetailsForUnsplash.authorName} - - on - - Unsplash - -
- )} + + {authorDetailsForUnsplash.authorName && ( +
+ Photo by + + {authorDetailsForUnsplash.authorName} + + on + + Unsplash +
-
+ )} ); case "upload": @@ -178,7 +175,7 @@ export const MediaBackground: React.FC = ({ ); } else { return ( -
+
{renderBackground()}
{children}
diff --git a/apps/web/app/s/[surveyId]/layout.tsx b/apps/web/app/s/[surveyId]/layout.tsx index 0d2c86aebb..06964dcc42 100644 --- a/apps/web/app/s/[surveyId]/layout.tsx +++ b/apps/web/app/s/[surveyId]/layout.tsx @@ -1,3 +1,3 @@ export default async function SurveyLayout({ children }) { - return
{children}
; + return
{children}
; } diff --git a/packages/lib/utils/datetime.ts b/packages/lib/utils/datetime.ts index 0168370392..15c38a9fd4 100644 --- a/packages/lib/utils/datetime.ts +++ b/packages/lib/utils/datetime.ts @@ -1,9 +1,29 @@ +const monthNames = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", +]; + // Helper function to calculate difference in days between two dates export const diffInDays = (date1: Date, date2: Date) => { const diffTime = Math.abs(date2.getTime() - date1.getTime()); return Math.floor(diffTime / (1000 * 60 * 60 * 24)); }; +// Helper function to get the month name +export const getMonthName = (monthIndex: number) => { + return monthNames[monthIndex]; +}; + export const formatDateWithOrdinal = (date: Date): string => { const getOrdinalSuffix = (day: number) => { const suffixes = ["th", "st", "nd", "rd"]; @@ -12,20 +32,6 @@ export const formatDateWithOrdinal = (date: Date): string => { }; const dayOfWeekNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; - const monthNames = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December", - ]; const dayOfWeek = dayOfWeekNames[date.getDay()]; const day = date.getDate(); @@ -35,6 +41,22 @@ export const formatDateWithOrdinal = (date: Date): string => { return `${dayOfWeek}, ${monthNames[monthIndex]} ${day}${getOrdinalSuffix(day)}, ${year}`; }; +// Helper function to format the date with an ordinal suffix +export const getOrdinalDate = (date: number) => { + const j = date % 10, + k = date % 100; + if (j === 1 && k !== 11) { + return date + "st"; + } + if (j === 2 && k !== 12) { + return date + "nd"; + } + if (j === 3 && k !== 13) { + return date + "rd"; + } + return date + "th"; +}; + export function isValidDateString(value: string) { const regex = /^(?:\d{4}-\d{2}-\d{2}|\d{2}-\d{2}-\d{4})$/; diff --git a/packages/surveys/src/components/general/CalEmbed.tsx b/packages/surveys/src/components/general/CalEmbed.tsx index 996d639078..20ae39081f 100644 --- a/packages/surveys/src/components/general/CalEmbed.tsx +++ b/packages/surveys/src/components/general/CalEmbed.tsx @@ -49,7 +49,7 @@ export default function CalEmbed({ question, onSuccessfulBooking }: CalEmbedProp }, [cal, question.calUserName]); return ( -
+
); diff --git a/packages/surveys/src/components/general/FileInput.tsx b/packages/surveys/src/components/general/FileInput.tsx index 5f0313d826..1898d56154 100644 --- a/packages/surveys/src/components/general/FileInput.tsx +++ b/packages/surveys/src/components/general/FileInput.tsx @@ -209,7 +209,7 @@ export default function FileInput({ return (
-
+
{fileUrls && fileUrls?.map((file, index) => { const fileName = getOriginalFileNameFromUrl(file); diff --git a/packages/surveys/src/components/questions/ConsentQuestion.tsx b/packages/surveys/src/components/questions/ConsentQuestion.tsx index b44ee061a8..18bb47884f 100644 --- a/packages/surveys/src/components/questions/ConsentQuestion.tsx +++ b/packages/surveys/src/components/questions/ConsentQuestion.tsx @@ -63,42 +63,44 @@ export const ConsentQuestion = ({ htmlString={getLocalizedValue(question.html, languageCode) || ""} questionId={question.id} /> - -
+
{!isFirstQuestion && ( {errorMessage}
{loading && ( -
+
diff --git a/packages/surveys/src/components/questions/MatrixQuestion.tsx b/packages/surveys/src/components/questions/MatrixQuestion.tsx index a6a072ff9b..e1bba01aaa 100644 --- a/packages/surveys/src/components/questions/MatrixQuestion.tsx +++ b/packages/surveys/src/components/questions/MatrixQuestion.tsx @@ -104,7 +104,7 @@ export const MatrixQuestion = ({ subheader={getLocalizedValue(question.subheader, languageCode)} questionId={question.id} /> -
+
@@ -154,7 +154,7 @@ export const MatrixQuestion = ({ -
+
{!isFirstQuestion && (
Options -
+
{questionChoices.map((choice, idx) => (