From 15deef7efa0a9bb5b23e5bee251cee81f6149282 Mon Sep 17 00:00:00 2001 From: Bruno Menezes Date: Mon, 5 Feb 2024 13:36:40 +1300 Subject: [PATCH 1/3] chore: update editor config to new values. --- .vscode/settings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 702de911..159765e5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,8 +3,8 @@ "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.codeActionsOnSave": { - "source.fixAll": true, - "source.organizeImports": true + "source.fixAll": "explicit", + "source.organizeImports": "explicit" }, "typescript.tsdk": "node_modules/typescript/lib", "[terraform]": { From df9fc7716ca8166788f72262a369ed34e91918f9 Mon Sep 17 00:00:00 2001 From: Bruno Menezes Date: Mon, 5 Feb 2024 15:35:04 +1300 Subject: [PATCH 2/3] feat: Close small menu when click navigational-link --- apps/web/src/components/layout/shell.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/layout/shell.tsx b/apps/web/src/components/layout/shell.tsx index 5e378d2d..fc55d792 100644 --- a/apps/web/src/components/layout/shell.tsx +++ b/apps/web/src/components/layout/shell.tsx @@ -52,6 +52,7 @@ const Shell: FC<{ children: ReactNode }> = ({ children }) => { const { isConnected } = useAccount(); const { colorScheme, toggleColorScheme } = useMantineColorScheme(); const themeDefaultProps = theme.components?.AppShell?.defaultProps ?? {}; + return ( = ({ children }) => { label="Home" href="/" leftSection={} + onClick={toggle} data-testid="home-link" /> } data-testid="applications-link" @@ -151,6 +154,7 @@ const Shell: FC<{ children: ReactNode }> = ({ children }) => { } data-testid="inputs-link" @@ -160,7 +164,6 @@ const Shell: FC<{ children: ReactNode }> = ({ children }) => { label="Send Transaction" leftSection={} disabled={!isConnected} - opened={isConnected && transaction} onClick={toggleTransaction} hiddenFrom="sm" /> From 6c2d651d6ffccdff38583269c36edc3169dcd36a Mon Sep 17 00:00:00 2001 From: Bruno Menezes Date: Mon, 5 Feb 2024 15:37:42 +1300 Subject: [PATCH 3/3] fix: Fix hydration problem on dark-mode for send-transaction After refresh a page on dark mode when wallet is already connected the send-transaction button will continue to be disabled due to hydration problems between result comparison between content rendered on server and client. --- apps/web/src/app/layout.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index 27437cff..5e2c8d46 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -1,10 +1,10 @@ +import { ColorSchemeScript } from "@mantine/core"; import "@mantine/core/styles.css"; import "@mantine/notifications/styles.css"; -import type { FC, ReactNode } from "react"; import { Metadata } from "next"; -import { ColorSchemeScript } from "@mantine/core"; +import dynamic from "next/dynamic"; +import type { FC, ReactNode } from "react"; import { Providers } from "../providers/providers"; -import Shell from "../components/layout/shell"; export const metadata: Metadata = { title: { @@ -18,6 +18,9 @@ export const metadata: Metadata = { }, }; +const Shell = dynamic(() => import("../components/layout/shell"), { + ssr: false, +}); interface LayoutProps { children: ReactNode; }