Merge branch 'main' of https://github.com/formbricks/formbricks into survey-height-tweaks

This commit is contained in:
Jakob Schott
2025-05-21 19:01:40 +02:00
2 changed files with 14 additions and 0 deletions

View File

@@ -75,6 +75,9 @@ describe("getMetadataForLinkSurvey", () => {
title: mockSurveyName,
images: [mockOgImageUrl],
},
alternates: {
canonical: `/s/${mockSurveyId}`,
},
});
});
@@ -147,6 +150,9 @@ describe("getMetadataForLinkSurvey", () => {
title: mockSurveyName,
images: [mockOgImageUrl],
},
alternates: {
canonical: `/s/${mockSurveyId}`,
},
});
});
@@ -174,6 +180,9 @@ describe("getMetadataForLinkSurvey", () => {
title: mockSurveyName,
images: [mockOgImageUrl],
},
alternates: {
canonical: `/s/${mockSurveyId}`,
},
});
});
});

View File

@@ -27,8 +27,13 @@ export const getMetadataForLinkSurvey = async (surveyId: string): Promise<Metada
baseMetadata.twitter.images = [ogImgURL];
}
const canonicalPath = `/s/${surveyId}`;
return {
title: survey.name,
...baseMetadata,
alternates: {
canonical: canonicalPath,
},
};
};