From 5cfebac9809ccd0bb0b0a67c259e25fa0e19281d Mon Sep 17 00:00:00 2001 From: Atharva0506 Date: Sat, 22 Aug 2026 11:18:44 +0530 Subject: [PATCH 1/4] feat(dashboard): compact spacing and a hamburger drawer for the sidebar The dashboard nested four levels of horizontal padding and then applied an inner max-w-7xl on top of a fixed sidebar, which left a wide dead gutter on the right and pushed the invoice items well below the fold. - Add src/utils/layout.js holding the page container, card, header and section-gap classes so the dashboard rhythm is tuned in one place instead of per-page magic classes. - Drop the inner max-width from every dashboard page and trim the padding and section margins across Create Invoice, Create Multiple Invoices, Sent, Received, Request Invoices and Settings. - Replace the mobile MUI Select with a hamburger that opens a slide-out Drawer. The nav list is extracted into DashboardNav and rendered by both the desktop rail and the drawer, so the two cannot drift apart. The hamburger doubles as the current-section label, and navigating closes the drawer instead of leaving the overlay parked over the new page. - Fix the fixed-navbar offset: the navbar is h-24 but the main padding was pt-20, so content sat 16px underneath and only cleared it thanks to an unrelated mt-4 on the dashboard heading. --- frontend/src/page/Applayout.jsx | 4 +- frontend/src/page/CreateInvoice.jsx | 28 +- frontend/src/page/CreateInvoicesBatch.jsx | 9 +- frontend/src/page/GenerateLink.jsx | 4 +- frontend/src/page/Home.jsx | 350 ++++++++++------------ frontend/src/page/ReceivedInvoice.jsx | 6 +- frontend/src/page/SentInvoice.jsx | 6 +- frontend/src/page/Settings.jsx | 8 +- frontend/src/utils/layout.js | 21 ++ 9 files changed, 213 insertions(+), 223 deletions(-) create mode 100644 frontend/src/utils/layout.js diff --git a/frontend/src/page/Applayout.jsx b/frontend/src/page/Applayout.jsx index 83feae16..7c2d0d42 100644 --- a/frontend/src/page/Applayout.jsx +++ b/frontend/src/page/Applayout.jsx @@ -8,7 +8,9 @@ function Applayout() { return (
-
+ {/* Navbar is fixed at h-24, so the offset has to match it exactly — + pt-20 left content tucked 16px underneath. */} +
diff --git a/frontend/src/page/CreateInvoice.jsx b/frontend/src/page/CreateInvoice.jsx index e9193482..40db8003 100644 --- a/frontend/src/page/CreateInvoice.jsx +++ b/frontend/src/page/CreateInvoice.jsx @@ -55,6 +55,7 @@ import { toInvoiceUserDetails } from "@/utils/userProfile"; import { useUserProfile } from "@/hooks/useUserProfile"; import OnboardingProfileDialog from "@/components/OnboardingProfileDialog"; import SenderSummary from "@/components/SenderSummary"; +import { CARD, PAGE_CONTAINER } from "@/utils/layout"; import toast from "react-hot-toast"; import { storeInvoice } from "../services/invoiceStorage/invoiceDB.js"; import { computeInvoiceHash } from "../services/relay/invoiceHashUtils.js"; @@ -798,7 +799,7 @@ function CreateInvoice() { {showUnsupportedNetwork && ( -
+

Unsupported network @@ -812,16 +813,11 @@ function CreateInvoice() {

)} -
+
{(searchParams.get("clientAddress") || searchParams.get("amount") || searchParams.get("description")) && ( -
+
@@ -837,14 +833,14 @@ function CreateInvoice() {
)} -
+

Create New Invoice

-
+