From 6913c1e5ee35e7a294482e9f18693df92ca80c12 Mon Sep 17 00:00:00 2001 From: Munkherdene Date: Sat, 22 Aug 2026 21:33:14 +0800 Subject: [PATCH] feat(web): desktop layout (wider container + 2-col dashboard) + redirect-loop fix + mn string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Shell content widens to max-w-6xl on desktop (was phone-strip max-w-2xl) - Dashboard reflows into a 2-col grid on desktop instead of stretching - On 401, clear session cookie via logout before redirect (prevents /login<->/home loop when cookie outlives server session) - Profile 'Subscriptions' -> 'Захиалга' --- src/api/client.ts | 8 +++++++- src/app/(app)/layout.tsx | 2 +- src/features/home/DashboardView.tsx | 2 ++ src/features/profile/strings.ts | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/api/client.ts b/src/api/client.ts index 04aa0cf..21f580b 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -17,7 +17,13 @@ async function req(method: string, path: string, body?: unknown): Promise {}); + window.location.href = "/login"; + } throw new ApiError(401, "unauthorized"); } if (!res.ok) throw new ApiError(res.status, await res.text()); diff --git a/src/app/(app)/layout.tsx b/src/app/(app)/layout.tsx index 8292f93..2a89162 100644 --- a/src/app/(app)/layout.tsx +++ b/src/app/(app)/layout.tsx @@ -11,7 +11,7 @@ export default function AppLayout({ children }: { children: ReactNode }) {
-
+
{children}
diff --git a/src/features/home/DashboardView.tsx b/src/features/home/DashboardView.tsx index 2047fd9..6ae8c3c 100644 --- a/src/features/home/DashboardView.tsx +++ b/src/features/home/DashboardView.tsx @@ -73,6 +73,7 @@ export function DashboardView() { +
{/* Safe-to-spend hero (green): how much is left to spend this month after committed obligations and what's already been spent. */}
+ ); } diff --git a/src/features/profile/strings.ts b/src/features/profile/strings.ts index 068b059..0b7b2ea 100644 --- a/src/features/profile/strings.ts +++ b/src/features/profile/strings.ts @@ -14,7 +14,7 @@ export const profileStrings = { menu: { settings: "Тохиргоо", categories: "Ангилал", - subscriptions: "Subscriptions", + subscriptions: "Захиалга", }, display: { title: "Дэлгэц ба нууцлал",