From 778b3d8c77e2a32bcaf53902421c09042e2ec5b2 Mon Sep 17 00:00:00 2001 From: Prach Yot Date: Thu, 6 Mar 2025 15:36:25 +0700 Subject: [PATCH 1/6] feat(layout): add migration banner to layout for initia --- src/lib/layout/index.tsx | 122 ++++++++++++++++++++++++++------------- 1 file changed, 81 insertions(+), 41 deletions(-) diff --git a/src/lib/layout/index.tsx b/src/lib/layout/index.tsx index 040237688..115b14219 100644 --- a/src/lib/layout/index.tsx +++ b/src/lib/layout/index.tsx @@ -1,9 +1,11 @@ -import { Grid, GridItem } from "@chakra-ui/react"; +import { Box, Button, Flex, Grid, GridItem, Text } from "@chakra-ui/react"; +import Link from "next/link"; import { useRouter } from "next/router"; import type { ReactNode } from "react"; import { useEffect, useMemo } from "react"; -import { useMobile, useNavContext } from "lib/app-provider"; +import { useInitia, useMobile, useNavContext } from "lib/app-provider"; +import { CustomIcon } from "lib/components/icon"; import { scrollToTop } from "lib/utils"; import Footer from "./Footer"; @@ -20,6 +22,7 @@ const Layout = ({ children }: LayoutProps) => { const router = useRouter(); const isMobile = useMobile(); const { isExpand, setIsExpand } = useNavContext(); + const isInitia = useInitia(); const defaultRow = "64px 48px 1fr"; const mode = useMemo(() => { @@ -48,46 +51,83 @@ const Layout = ({ children }: LayoutProps) => { }, [router.asPath, router.query.tab]); return ( - - - {mode.header} - - {!isMobile && ( - <> - - {mode.subHeader} - - - - - + + {isInitia && ( + + + Initia Wallet extension is being deprecated. Existing extension + users must migrate to be eligible for future incentives. + + + + + )} - -
- {children} -
-