fix(desktop): constrain profile sub-pages so they don't stretch on desktop

These pages are desktop-enabled (they get the DesktopHeader via the /profile
allowlist) but had no desktop layout, so their content stretched edge-to-edge on
wide screens. Add a centered max-width container + a desktop title to the main
profile sub-pages (bookmarks, following, orders, settings, wallet, addresses,
sets). Grids use a wider max-width; single-column lists a narrower one.
ProfilePagesHeader is already lg:hidden, so the mobile header still disappears.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Arda Samadi 2026-07-09 11:53:28 +03:30
parent 0a482c70fa
commit a67e81ad55
7 changed files with 28 additions and 7 deletions

View File

@ -18,8 +18,11 @@ export default function Bookmarks() {
const bookmarks = data?.pages.flatMap((page) => page.results) || [];
return (
<div className="flex flex-col gap-6">
<div className="flex flex-col gap-6 lg:max-w-[1320px] lg:mx-auto lg:w-full lg:px-8 lg:py-6">
<ProfilePagesHeader title="ذخیره شده‌ها" />
<h1 className="hidden lg:block text-[28px] font-extrabold">
ذخیره شدهها
</h1>
{/* Content */}
<MondrianProductList

View File

@ -15,8 +15,11 @@ export default function Following() {
} = useServiceGetFollowedSellers();
return (
<div className="flex flex-col gap-0 pb-20">
<div className="flex flex-col gap-0 pb-20 lg:max-w-[720px] lg:mx-auto lg:w-full lg:px-6 lg:py-6">
<ProfilePagesHeader title="فروشگاه‌های دنبال شده" />
<h1 className="hidden lg:block text-[28px] font-extrabold mb-4">
فروشگاههای دنبال شده
</h1>
<UiProvider
isLoading={isLoading}
isEmpty={!followedSellers || followedSellers.length === 0}

View File

@ -47,8 +47,11 @@ export const meta: MetaFunction = () => {
export default function Locaton() {
return (
<div className="flex flex-col gap-4 w-full items-center">
<div className="flex flex-col gap-4 w-full items-center lg:max-w-[820px] lg:mx-auto lg:pt-6">
<ProfilePagesHeader title="آدرس‌های من" />
<h1 className="hidden lg:block w-full text-[28px] font-extrabold px-4">
آدرسهای من
</h1>
<MainContent />
<Link
to={"/profile/location/add"}

View File

@ -148,8 +148,11 @@ export default function Orders() {
setActiveFactorId={setActiveFactorId}
/>
) : (
<div className="flex flex-col w-full items-center">
<div className="flex flex-col w-full items-center lg:max-w-[820px] lg:mx-auto lg:pt-4">
<ProfilePagesHeader title="سفارش‌های من" />
<h1 className="hidden lg:block w-full text-[28px] font-extrabold px-6 mb-2">
سفارشهای من
</h1>
<div
className={`pt-4 px-6 pb-[2px] flex w-full justify-between border-b`}
>

View File

@ -30,9 +30,12 @@ export default function ProfileSets() {
};
return (
<div className="flex flex-col min-h-screen bg-WHITE2">
<div className="flex flex-col min-h-screen bg-WHITE2 lg:bg-transparent lg:max-w-[1100px] lg:mx-auto lg:w-full lg:pt-6">
{/* Header */}
<ProfilePagesHeader title="ست‌های من" />
<h1 className="hidden lg:block text-[28px] font-extrabold px-4 mb-2">
ستهای من
</h1>
{/* Content */}
<div className="flex-1 p-4">

View File

@ -85,8 +85,11 @@ export default function Setting() {
};
return (
<div className="flex flex-col gap-2 w-full pb-[100px]">
<div className="flex flex-col gap-2 w-full pb-[100px] lg:max-w-[720px] lg:mx-auto lg:pt-6">
<ProfilePagesHeader title="اطلاعات کاربری" />
<h1 className="hidden lg:block text-[28px] font-extrabold px-5">
اطلاعات کاربری
</h1>
<div className="flex flex-col gap-12 pt-4 w-full px-5">
<AppInput
loading={isFetchingProfile}

View File

@ -49,8 +49,11 @@ export default function Locaton() {
const [amount, setAmount] = useState("");
return (
<div className="flex flex-col gap-6 w-full items-center">
<div className="flex flex-col gap-6 w-full items-center lg:max-w-[820px] lg:mx-auto lg:pt-6">
<ProfilePagesHeader title="کیف پول" />
<h1 className="hidden lg:block w-full text-[28px] font-extrabold px-4">
کیف پول
</h1>
<MainContent />
<Button
className="fixed bottom-16 z-10 lg:static lg:bottom-auto lg:z-auto lg:mt-4"