Enhances the account page navigation by adding a "Back to home" button and improving the overall user experience with better visual hierarchy and navigation flow. Changes: - Add home navigation button to account page with green icon - Update logout button styling with red icon for visual emphasis - Improve settings button label clarity - Fix settings cancel button to navigate back to account page - Increase account icon size in page header - Update translation keys for consistency across EN/HR 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
928 B
TypeScript
27 lines
928 B
TypeScript
"use client";
|
|
|
|
import Image from "next/image";
|
|
import Link from "next/link";
|
|
import { SelectLanguage } from "./SelectLanguage";
|
|
import AccountCircle from "@mui/icons-material/AccountCircle";
|
|
import { useLocale } from "next-intl";
|
|
import { usePathname } from "next/navigation";
|
|
|
|
export const PageHeader = () => {
|
|
const locale = useLocale();
|
|
const pathname = usePathname();
|
|
const isRestrictedPage = pathname.includes('/home');
|
|
|
|
return (
|
|
<div className="navbar bg-base-100 mb-6">
|
|
<Link className="btn btn-ghost text-xl" href="/"><Image src="/icon3.png" alt="logo" width={48} height={48} /> Režije</Link>
|
|
<span className="grow"> </span>
|
|
<SelectLanguage />
|
|
{isRestrictedPage && (
|
|
<Link href={`/${locale}/home/account/`} className="btn btn-ghost btn-circle">
|
|
<AccountCircle fontSize="large" />
|
|
</Link>
|
|
)}
|
|
</div>
|
|
);
|
|
} |