diff --git a/src/components/common/overall-layout/layout.tsx b/src/components/common/overall-layout/layout.tsx index 870d142c..914bd2f1 100644 --- a/src/components/common/overall-layout/layout.tsx +++ b/src/components/common/overall-layout/layout.tsx @@ -12,9 +12,8 @@ import useAppWallet from "@/hooks/useAppWallet"; import SessionProvider from "@/components/SessionProvider"; import { getServerSession } from "next-auth"; -import MenuWallets from "@/components/common/overall-layout/menus/wallets"; +// import MenuWallets from "@/components/common/overall-layout/menus/wallets"; import MenuWallet from "@/components/common/overall-layout/menus/multisig-wallet"; -import WalletDropDown from "@/components/common/overall-layout/wallet-drop-down"; import { WalletDataLoaderWrapper, DialogReportWrapper, @@ -27,13 +26,6 @@ import ConnectWallet from "@/components/common/cardano-objects/connect-wallet"; import Loading from "@/components/common/overall-layout/loading"; import { MobileNavigation } from "@/components/ui/mobile-navigation"; import { MobileActionsMenu } from "@/components/ui/mobile-actions-menu"; -import { - Breadcrumb, - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbList, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; // Enhanced error boundary component for wallet errors class WalletErrorBoundary extends Component< @@ -161,19 +153,6 @@ export default function RootLayout({ return; } - // Handle connection errors with retry logic - if (error instanceof Error && ( - error.message.includes("Could not establish connection") || - error.message.includes("Receiving end does not exist") || - error.message.includes("Cannot read properties of undefined") - )) { - console.log("Browser extension connection error detected, retrying in 2 seconds..."); - setTimeout(() => { - window.location.reload(); - }, 2000); - return; - } - // For other errors, don't throw to prevent app crash // The user can retry by reconnecting their wallet } @@ -187,106 +166,33 @@ export default function RootLayout({ const isLoggedIn = !!user; return ( -
+
{isLoading && } - {/* Sidebar for larger screens - shown when logged in */} - {isLoggedIn && ( - - )} - - {/* Main content area */} -
-
+ {/* Header - full width, always on top */} +
- {/* Mobile menu button - only when logged in */} - {isLoggedIn && } + {/* Mobile menu button - only in wallet context */} + {isWalletPath && } - {/* Logo in header - left on landing page (all sizes), centered on mobile when logged in */} -
+ {/* Logo - in fixed-width container matching sidebar width */} +
- - - - - Multi-Sig Platform + + + Multisig Platform
- {/* Wallet selection + breadcrumb row on desktop */} - {isLoggedIn && ( -
-
- -
-
- )} - {/* Right: Control buttons */} -
+
{!connected ? ( ) : ( @@ -309,17 +215,31 @@ export default function RootLayout({ )}
-
+
+ {/* Content area with sidebar + main */} +
+ {/* Sidebar for larger screens - only in wallet context */} + {isWalletPath && ( + + )} + {/* Main content */}
-

Something went wrong

Please try refreshing the page or reconnecting your wallet.

- + + + {wallets + .filter((wallet) => !wallet.isArchived) + .sort((a, b) => a.name.localeCompare(b.name)) + .map((wallet) => ( + + + + ))} + + + + + + +
+ + {/* Menu Items */} +
+
+ Menu +
- -
Governance
+ + Overview
-
- Transactions - {transactions && transactions.length > 0 && ( - - {transactions.length} - - )} -
+ Transactions + {transactions && transactions.length > 0 && ( + + {transactions.length} + + )} +
+ + + Governance -
- Signing - {signables && signables.length > 0 && ( - - {signables.length} - - )} -
+ Signing + {signables && signables.length > 0 && ( + + {signables.length} + + )}
{multisigWallet && multisigWallet.stakingEnabled() && - + Staking } - - -
Dapps
-
-
Assets
+ Assets
-
Chat
+ Chat
- -
Info
+ + Dapps
-
+
- {/* - -
Back
-
*/} + {/* Back to All Wallets */} +
+ + + All Wallets + +
+
); } diff --git a/src/components/common/overall-layout/wallet-nav-link.tsx b/src/components/common/overall-layout/wallet-nav-link.tsx index d2296bd8..52c90450 100644 --- a/src/components/common/overall-layout/wallet-nav-link.tsx +++ b/src/components/common/overall-layout/wallet-nav-link.tsx @@ -21,26 +21,22 @@ const WalletNavLink = React.forwardRef( -
- -
-
- {wallet.name} - {wallet.isArchived && " (Archived)"} -
-
- {transactions && transactions.length > 0 && ( - - {transactions.length} - - )} -
+ + + {wallet.name} + {wallet.isArchived && " (Archived)"} + + {transactions && transactions.length > 0 && ( + + {transactions.length} + + )}
); diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx index bee9d005..10cbe0e0 100644 --- a/src/components/ui/dropdown-menu.tsx +++ b/src/components/ui/dropdown-menu.tsx @@ -82,7 +82,7 @@ const DropdownMenuItem = React.forwardRef< React.ComponentPropsWithoutRef & { inset?: boolean } ->(({ className, inset, ...props }, ref) => ( +>(({ className, inset, ...props}, ref) => ( - - - - - -
-
+ {open ? ( - + - Multi-Sig Platform -
- -
-
- -
+ + + + ); } \ No newline at end of file diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx index 17b6cbaa..b2ab1fa8 100644 --- a/src/components/ui/sheet.tsx +++ b/src/components/ui/sheet.tsx @@ -16,12 +16,13 @@ const SheetPortal = SheetPrimitive.Portal const SheetOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( +>(({ className, style, ...props }, ref) => (