feat(i18n): localize submit button states
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
import { getI18n } from "@/i18n/server"
|
||||
import { getUserProfileById } from "@/services/user.service"
|
||||
|
||||
import EditUserForm from "../../_components/edit.user.form"
|
||||
@@ -12,6 +13,7 @@ export default async function EditUserPage({
|
||||
}) {
|
||||
const { userId } = await params
|
||||
const user = await getUserProfileById(userId)
|
||||
const { dictionary } = await getI18n()
|
||||
|
||||
if (!user) {
|
||||
notFound()
|
||||
@@ -22,10 +24,16 @@ export default async function EditUserPage({
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<h1 className="text-2xl font-bold">Edit User</h1>
|
||||
</div>
|
||||
<EditUserForm user={user} />
|
||||
<EditUserForm
|
||||
submitButtonCopy={dictionary.common.submitButton}
|
||||
user={user}
|
||||
/>
|
||||
<section className="flex flex-col gap-4 border-t pt-6">
|
||||
<h2 className="text-xl font-semibold">Reset password</h2>
|
||||
<ResetUserPasswordForm userId={user.id} />
|
||||
<ResetUserPasswordForm
|
||||
submitButtonCopy={dictionary.common.submitButton}
|
||||
userId={user.id}
|
||||
/>
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user