From c683c25fda0576c122ebff065e3468fe6ebf561c Mon Sep 17 00:00:00 2001 From: yukigesho Date: Fri, 22 Nov 2024 13:31:37 -0800 Subject: [PATCH 1/2] fix: extra tabs issue --- src/app/[netname]/layout.tsx | 3 +-- src/components/global/Wrapper.tsx | 25 ------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 src/components/global/Wrapper.tsx diff --git a/src/app/[netname]/layout.tsx b/src/app/[netname]/layout.tsx index 3d29f9ad..5a3af1bc 100644 --- a/src/app/[netname]/layout.tsx +++ b/src/app/[netname]/layout.tsx @@ -1,7 +1,6 @@ import { Metadata } from 'next'; import React from 'react'; -import Wrapper from '@/components/global/Wrapper'; import { Netname } from '@/utils/types'; type Props = { @@ -26,5 +25,5 @@ export async function generateMetadata({ params }: Props): Promise { } export default function Layout({ children }: Props) { - return {children}; + return children; } diff --git a/src/components/global/Wrapper.tsx b/src/components/global/Wrapper.tsx deleted file mode 100644 index 47bc6833..00000000 --- a/src/components/global/Wrapper.tsx +++ /dev/null @@ -1,25 +0,0 @@ -'use client'; - -import React, { useEffect } from 'react'; - -import '@/styles/globals.css'; -import '@/styles/colors.css'; - -import { useGetChain } from '@/hooks/useGetChain'; -import { useAccount, useSwitchChain } from 'wagmi'; - -export default function Wrapper({ children }: { children: React.ReactNode }) { - const chain = useGetChain(); - const account = useAccount(); - const switchChain = useSwitchChain(); - - useEffect(() => { - if (account.isConnected) { - if (chain.id !== account.chainId) { - switchChain.switchChain({ chainId: chain.id }); - } - } - }, [account, chain, switchChain]); - - return <>{children}; -} From 2135ef152a63ab0a276b0bccab76d130dfd8f175 Mon Sep 17 00:00:00 2001 From: Alina Lytovchenko Date: Sun, 8 Dec 2024 08:38:31 -0800 Subject: [PATCH 2/2] fix: issue #406 --- src/components/global/GameButton.tsx | 67 +++++++++++++--------------- 1 file changed, 30 insertions(+), 37 deletions(-) diff --git a/src/components/global/GameButton.tsx b/src/components/global/GameButton.tsx index 3b1c0de1..4b6e44c5 100644 --- a/src/components/global/GameButton.tsx +++ b/src/components/global/GameButton.tsx @@ -10,6 +10,13 @@ export default function GameButton() { xmlns='http://www.w3.org/2000/svg' > + + + + - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - -