From 49adef5d628d3b116ef46936bc3ba41cdfdba345 Mon Sep 17 00:00:00 2001 From: Tong Li Date: Sun, 24 Nov 2024 22:49:17 +1100 Subject: [PATCH] Tong/refine UI 1 (#374) * header, footer and background refactor for light theme * header, footer and background refactor for dark theme * patch logo * restyle error page * replace footer background image with css pseduo element * remove dark selector * use twjoin * use default tailwind value * Update src/app/components/Header/Header.tsx Co-authored-by: David Totrashvili <8580261+totraev@users.noreply.github.com> --------- Co-authored-by: David Totrashvili <8580261+totraev@users.noreply.github.com> --- .eslintignore | 1 + package-lock.json | 6 +- src/app/components/Connect/ConnectSmall.tsx | 4 +- src/app/components/Footer/Footer.tsx | 73 +++++++++++-------- src/app/components/Header/Header.tsx | 52 +++++++------ .../components/Header/SimplifiedHeader.tsx | 16 ++-- src/app/components/Logo/Logo.tsx | 22 +----- src/app/global-error.tsx | 1 + src/app/globals.css | 20 ----- src/app/layout.tsx | 1 + tailwind.config.ts | 8 +- 11 files changed, 96 insertions(+), 108 deletions(-) diff --git a/.eslintignore b/.eslintignore index a71674ac..2d122839 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ /playwright-report/ /blob-report/ /playwright/.cache/ +/out/ diff --git a/package-lock.json b/package-lock.json index f863a14d..19100836 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18059,9 +18059,9 @@ "license": "MIT" }, "node_modules/tailwind-merge": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.2.tgz", - "integrity": "sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg==", + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.4.tgz", + "integrity": "sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q==", "license": "MIT", "funding": { "type": "github", diff --git a/src/app/components/Connect/ConnectSmall.tsx b/src/app/components/Connect/ConnectSmall.tsx index ea7f46d6..128cb054 100644 --- a/src/app/components/Connect/ConnectSmall.tsx +++ b/src/app/components/Connect/ConnectSmall.tsx @@ -41,7 +41,7 @@ export const ConnectSmall: React.FC = ({ const ref = useRef(null); useOnClickOutside(ref, handleClickOutside); - const { coinName, networkName } = getNetworkConfig(); + const { coinName } = getNetworkConfig(); const { isApiNormal, isGeoBlocked, apiMessage } = useHealthCheck(); // Renders the Tooltip describing the reason @@ -146,7 +146,7 @@ export const ConnectSmall: React.FC = ({ disabled={Boolean(address) || !isApiNormal} > - Connect to {networkName} network + Connect Wallets {!isApiNormal && renderApiNotAvailableTooltip()} diff --git a/src/app/components/Footer/Footer.tsx b/src/app/components/Footer/Footer.tsx index c48a4ad9..84cfa71d 100644 --- a/src/app/components/Footer/Footer.tsx +++ b/src/app/components/Footer/Footer.tsx @@ -1,3 +1,4 @@ +import Image from "next/image"; import { BsDiscord, BsGithub, @@ -10,6 +11,8 @@ import { GoHome } from "react-icons/go"; import { IoMdBook } from "react-icons/io"; import { MdAlternateEmail, MdForum } from "react-icons/md"; +import babylonIcon from "@/app/assets/logo-white.svg"; + const iconLinks = [ { name: "Website", @@ -65,44 +68,50 @@ const iconLinks = [ export const Footer: React.FC = () => { return ( -
-
-
-
- -
- {iconLinks.map(({ name, url, Icon }) => ( -
+
+
+
+
+ {iconLinks.map(({ name, url, Icon }) => ( +
+ + + +
+ ))} +
+
+ + Terms of Use + {" "} + -{" "} - - + Privacy Policy + {" "} + - 2024 Babylon Labs. All rights reserved.
- ))} +
+
+ babylon +
); diff --git a/src/app/components/Header/Header.tsx b/src/app/components/Header/Header.tsx index 53de3362..0b734e05 100644 --- a/src/app/components/Header/Header.tsx +++ b/src/app/components/Header/Header.tsx @@ -1,10 +1,12 @@ +import { twJoin } from "tailwind-merge"; + import { useBTCWallet } from "@/app/context/wallet/BTCWalletProvider"; import { useWalletConnection } from "@/app/context/wallet/WalletConnectionProvider"; import { useAppState } from "@/app/state"; import { shouldDisplayTestingMsg } from "@/config"; -import { ConnectSmall } from "../Connect/ConnectSmall"; import { ConnectedSmall } from "../Connect/ConnectedSmall"; +import { ConnectSmall } from "../Connect/ConnectSmall"; import { Logo } from "../Logo/Logo"; import { TestingInfo } from "../TestingInfo/TestingInfo"; import { ThemeToggle } from "../ThemeToggle/ThemeToggle"; @@ -16,8 +18,8 @@ export const Header = () => { return (