From 77011060827ff87f5bffb8c80a7d9d26620ad14f Mon Sep 17 00:00:00 2001 From: tonytc13579 Date: Thu, 4 Jan 2024 18:29:12 +0700 Subject: [PATCH] Fix text , css --- src/layouts/Header/components/DesktopNav.tsx | 47 +++++++++++++++----- src/layouts/Header/components/IcTW.tsx | 19 ++++++++ src/layouts/Header/menuConfig.ts | 4 +- src/modules/home/Section_2/index.tsx | 2 +- 4 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 src/layouts/Header/components/IcTW.tsx diff --git a/src/layouts/Header/components/DesktopNav.tsx b/src/layouts/Header/components/DesktopNav.tsx index f914805c1..91772e099 100644 --- a/src/layouts/Header/components/DesktopNav.tsx +++ b/src/layouts/Header/components/DesktopNav.tsx @@ -1,9 +1,10 @@ 'use client'; -import { HStack, Text } from '@chakra-ui/react'; +import { Box, HStack, Text } from '@chakra-ui/react'; import Link from 'next/link'; import { NAV_ITEMS } from '../menuConfig'; +import { IcTW } from './IcTW'; type Props = { primaryColor?: 'black' | 'white'; @@ -19,16 +20,40 @@ export const DesktopNav = (props: Props) => { target={navItem.isNewWindow ? '_blank' : '_self'} color={props?.primaryColor || 'white'} > - - {navItem.label} - + {navItem?.isTwitter ? ( + { + window.open(navItem.href, '_blank'); + }} + > + + + ) : ( + + {navItem.label} + + )} ))} diff --git a/src/layouts/Header/components/IcTW.tsx b/src/layouts/Header/components/IcTW.tsx new file mode 100644 index 000000000..5959535df --- /dev/null +++ b/src/layouts/Header/components/IcTW.tsx @@ -0,0 +1,19 @@ +//#30ccfb +const IcTW = ({ fillColor }: { fillColor?: string }) => { + return ( + + + + ); +}; + +export { IcTW }; diff --git a/src/layouts/Header/menuConfig.ts b/src/layouts/Header/menuConfig.ts index 183971e81..10afd53b0 100644 --- a/src/layouts/Header/menuConfig.ts +++ b/src/layouts/Header/menuConfig.ts @@ -5,6 +5,7 @@ export interface NavItem { isNewWindow?: boolean; href?: string; isHide?: boolean; + isTwitter?: boolean; } export const NAV_ITEMS: Array = [ @@ -27,13 +28,14 @@ export const NAV_ITEMS: Array = [ isHide: false, }, { - label: 'Whitepapers', + label: 'Whitepaper', href: 'https://_blank', isNewWindow: true, isHide: false, }, { label: 'Twitter', + isTwitter: true, href: 'https://twitter.com/bvmnetwork', isNewWindow: true, isHide: false, diff --git a/src/modules/home/Section_2/index.tsx b/src/modules/home/Section_2/index.tsx index 02c42c7bc..2aad56423 100644 --- a/src/modules/home/Section_2/index.tsx +++ b/src/modules/home/Section_2/index.tsx @@ -83,7 +83,7 @@ const Section_2 = () => { ) } > - {`${item.isComminSoon ? 'Comming soon' : 'View Project'}`} + {`${item.isComminSoon ? 'Coming soon' : 'View Project'}`}