fix: person response page and copy link transalation issue (#4239)

Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
This commit is contained in:
Dhruwang Jariwala
2024-11-06 04:25:20 +05:30
committed by GitHub
parent 0c37956943
commit bee0ab07b4
3 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
import { ResponseTimeline } from "@/app/(app)/environments/[environmentId]/(people)/people/[personId]/components/ResponseTimeline";
import { getServerSession } from "next-auth";
import { useTranslations } from "next-intl";
import { getTranslations } from "next-intl/server";
import { authOptions } from "@formbricks/lib/authOptions";
import { getResponsesByPersonId } from "@formbricks/lib/response/service";
import { getSurveys } from "@formbricks/lib/survey/service";
@@ -28,7 +28,7 @@ export const ResponseSection = async ({
const surveyIds = responses?.map((response) => response.surveyId) || [];
const surveys: TSurvey[] = surveyIds.length === 0 ? [] : ((await getSurveys(environment.id)) ?? []);
const session = await getServerSession(authOptions);
const t = useTranslations();
const t = await getTranslations();
if (!session) {
throw new Error(t("common.no_session_found"));
}

View File

@@ -65,7 +65,7 @@ export const ShareInviteModal = ({ inviteToken, open, setOpen }: ShareInviteModa
title={t("environments.settings.general.copy_invite_link_to_clipboard")}
aria-label="Copy invite link to clipboard"
EndIcon={CopyIcon}>
{t("common.copy_url")}
{t("common.copy_link")}
</Button>
</div>
</div>