From 513e78e8f1da6e553c8d423680f4485e7066b59f Mon Sep 17 00:00:00 2001 From: Knee Cola Date: Mon, 17 Nov 2025 18:44:24 +0100 Subject: [PATCH] Refactor account page to use icon in form title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove redundant page heading from account page - Add AccountCircle icon to AccountForm title - Clean up unused account-page translations - Simplify account page component by moving title to form 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/[locale]/account/page.tsx | 4 ---- app/ui/AccountForm.tsx | 3 ++- messages/en.json | 3 --- messages/hr.json | 3 --- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/[locale]/account/page.tsx b/app/[locale]/account/page.tsx index 0d7e0d7..c8fc5e1 100644 --- a/app/[locale]/account/page.tsx +++ b/app/[locale]/account/page.tsx @@ -2,17 +2,13 @@ import { FC, Suspense } from 'react'; import { Main } from '@/app/ui/Main'; import { AccountForm, AccountFormSkeleton } from '@/app/ui/AccountForm'; import { getUserProfile } from '@/app/lib/actions/userProfileActions'; -import { useTranslations } from 'next-intl'; -import { getTranslations } from 'next-intl/server'; const AccountPage: FC = async () => { const profile = await getUserProfile(); - const t = await getTranslations('account-page'); return (
-

{t('heading')}

diff --git a/app/ui/AccountForm.tsx b/app/ui/AccountForm.tsx index 94c61b2..cc2aa2a 100644 --- a/app/ui/AccountForm.tsx +++ b/app/ui/AccountForm.tsx @@ -6,6 +6,7 @@ import { updateUserProfile } from "../lib/actions/userProfileActions"; import { useFormState, useFormStatus } from "react-dom"; import { useLocale, useTranslations } from "next-intl"; import Link from "next/link"; +import AccountCircleIcon from "@mui/icons-material/AccountCircle"; export type AccountFormProps = { profile: UserProfile | null; @@ -161,7 +162,7 @@ export const AccountForm: FC = ({ profile }) => { return (
-

{t("title")}

+

{t("title")}