mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-07 08:50:25 -06:00
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:
committed by
GitHub
parent
0c37956943
commit
bee0ab07b4
@@ -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"));
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { XCircleIcon } from "lucide-react";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
export const ErrorComponent: React.FC = async ({}) => {
|
||||
const t = await getTranslations();
|
||||
export const ErrorComponent: React.FC = () => {
|
||||
const t = useTranslations();
|
||||
return (
|
||||
<div className="rounded-lg bg-red-50 p-4">
|
||||
<div className="flex">
|
||||
|
||||
Reference in New Issue
Block a user