From 0a0503f5f157f5efe16820ccbd3fd39a2e0e5b80 Mon Sep 17 00:00:00 2001 From: tonytc13579 Date: Tue, 9 Jan 2024 01:24:26 +0700 Subject: [PATCH] Modify code --- src/components/Hydrated/index.tsx | 4 ++-- src/layouts/Header/components/DesktopNav.tsx | 4 +--- src/layouts/Header/components/DrawerMenu.tsx | 11 +++++++--- src/layouts/Header/index.tsx | 17 +++++++++++++-- src/modules/building-blocks/index.tsx | 17 ++++----------- .../building-blocks/styles.module.scss | 1 + src/modules/bvm/Section_1/index.tsx | 21 ++++++++++++------- src/modules/bvm/Section_2/index.tsx | 13 ++++++------ src/modules/bvm/index.tsx | 18 +++++----------- src/modules/bvm/styles.module.scss | 1 + src/modules/iframe-tc/index.tsx | 4 ++-- src/modules/iframe-tc/styles.module.scss | 10 ++++----- 12 files changed, 64 insertions(+), 57 deletions(-) diff --git a/src/components/Hydrated/index.tsx b/src/components/Hydrated/index.tsx index abb849f95..51bef2899 100644 --- a/src/components/Hydrated/index.tsx +++ b/src/components/Hydrated/index.tsx @@ -6,8 +6,8 @@ import { useRouter } from 'next/navigation'; export enum IframeEventName { topup = 'topup', - create_gamefi_wallet = 'create_gamefi_wallet', - import_gamefi_wallet = 'import_gamefi_wallet', + create_wallet = 'create_wallet', + import_wallet = 'import_wallet', hide_sidebar = 'hide_sidebar', open_sidebar = 'open_sidebar', trustless_computer_change_route = 'trustless-computer-change-route', diff --git a/src/layouts/Header/components/DesktopNav.tsx b/src/layouts/Header/components/DesktopNav.tsx index 91772e099..0d8ceab74 100644 --- a/src/layouts/Header/components/DesktopNav.tsx +++ b/src/layouts/Header/components/DesktopNav.tsx @@ -38,9 +38,7 @@ export const DesktopNav = (props: Props) => { window.open(navItem.href, '_blank'); }} > - + ) : ( { - const { isOpen, onToggle } = useDisclosure(); return ( - + {} @@ -33,7 +38,7 @@ const DrawerMobileMenu = (props: HeaderProps) => { width={50} height={50} alignSelf={'center'} - onClick={onToggle} + onClick={props.onToggle} /> diff --git a/src/layouts/Header/index.tsx b/src/layouts/Header/index.tsx index dc63958ca..fca7c287e 100644 --- a/src/layouts/Header/index.tsx +++ b/src/layouts/Header/index.tsx @@ -72,8 +72,21 @@ const Header = (props: HeaderProps) => { + } + color={'white'} aria-label={'Toggle Menu'} _hover={{ bgColor: 'transparent', @@ -86,7 +99,7 @@ const Header = (props: HeaderProps) => { - + ); }; diff --git a/src/modules/building-blocks/index.tsx b/src/modules/building-blocks/index.tsx index 4abd32438..99ba9fb3b 100644 --- a/src/modules/building-blocks/index.tsx +++ b/src/modules/building-blocks/index.tsx @@ -6,26 +6,17 @@ import s from './styles.module.scss'; import Section1 from './Section_1'; // import Section2 from './Section_2'; import Section2 from './Section_2_vs2'; +import BoxContent from '@/layouts/BoxContent'; const BuildingBlockModule = () => { return ( - - + + - + ); }; diff --git a/src/modules/building-blocks/styles.module.scss b/src/modules/building-blocks/styles.module.scss index 11ea7e09c..b3fce81dc 100644 --- a/src/modules/building-blocks/styles.module.scss +++ b/src/modules/building-blocks/styles.module.scss @@ -2,5 +2,6 @@ display: flex; flex: 1; flex-direction: column; + align-items: center; background-color: #F3F1E8; } diff --git a/src/modules/bvm/Section_1/index.tsx b/src/modules/bvm/Section_1/index.tsx index c509d7cc0..fe3a8ef37 100644 --- a/src/modules/bvm/Section_1/index.tsx +++ b/src/modules/bvm/Section_1/index.tsx @@ -10,21 +10,28 @@ const Section_1 = () => { return ( @@ -63,9 +70,9 @@ const Section_1 = () => { diff --git a/src/modules/bvm/Section_2/index.tsx b/src/modules/bvm/Section_2/index.tsx index dc02b0ee0..975c47a36 100644 --- a/src/modules/bvm/Section_2/index.tsx +++ b/src/modules/bvm/Section_2/index.tsx @@ -57,15 +57,16 @@ const Section_2 = () => { return ( - {Contents.map(renderItem)} - + ); }; diff --git a/src/modules/bvm/index.tsx b/src/modules/bvm/index.tsx index 40a3d6bd9..f6a3be77b 100644 --- a/src/modules/bvm/index.tsx +++ b/src/modules/bvm/index.tsx @@ -5,26 +5,18 @@ import s from './styles.module.scss'; import Section1 from './Section_1'; import Section2 from './Section_2'; +import BoxContent from '@/layouts/BoxContent'; const BVMModule = () => { return ( - - + + - + + ); }; diff --git a/src/modules/bvm/styles.module.scss b/src/modules/bvm/styles.module.scss index 11ea7e09c..b3fce81dc 100644 --- a/src/modules/bvm/styles.module.scss +++ b/src/modules/bvm/styles.module.scss @@ -2,5 +2,6 @@ display: flex; flex: 1; flex-direction: column; + align-items: center; background-color: #F3F1E8; } diff --git a/src/modules/iframe-tc/index.tsx b/src/modules/iframe-tc/index.tsx index 30cfa8826..8a11c020b 100644 --- a/src/modules/iframe-tc/index.tsx +++ b/src/modules/iframe-tc/index.tsx @@ -4,6 +4,7 @@ import useWindowSize from '@/hooks/useWindowSize'; import { Flex, Spinner } from '@chakra-ui/react'; import { useEffect, useState } from 'react'; import s from './styles.module.scss'; +import BoxContent from '@/layouts/BoxContent'; interface IProps { iframeURL: string; @@ -29,7 +30,7 @@ const IframeTC = (props: IProps) => { return <>; } return ( -
+