diff --git a/public/images/docs.png b/public/images/docs.png
new file mode 100644
index 00000000..9950d5c4
Binary files /dev/null and b/public/images/docs.png differ
diff --git a/public/images/menu.svg b/public/images/menu.svg
index 5228ae1c..9577a9ab 100644
--- a/public/images/menu.svg
+++ b/public/images/menu.svg
@@ -1,9 +1,9 @@
-
-
-
+
+
+
+ p-id="1462" fill="#FF0083">
diff --git a/public/images/my.svg b/public/images/my.svg
deleted file mode 100644
index 7a974d3d..00000000
--- a/public/images/my.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
diff --git a/public/images/projects/darwinia.png b/public/images/projects/darwinia.png
new file mode 100644
index 00000000..b8706bea
Binary files /dev/null and b/public/images/projects/darwinia.png differ
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 706c167a..a43ce551 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,8 +1,8 @@
-import Footer from "@/components/footer";
+// import Footer from "@/components/footer";
import "./globals.css";
import type { Metadata } from "next";
import { IBM_Plex_Sans } from "next/font/google";
-import Header from "@/components/header";
+// import Header from "@/components/header";
import RainbowProvider from "@/providers/rainbow-provider";
import GraphqlProvider from "@/providers/graphql-provider";
import AppProvider from "@/providers/app-provider";
@@ -14,8 +14,8 @@ const ibm_plex_sans = IBM_Plex_Sans({
});
export const metadata: Metadata = {
- title: "Helix xToken - Helix Bridge",
- description: "Helix Bridge for xToken cross-chain.",
+ title: "Darwinia xToken - Helix Bridge",
+ description: "Darwinia xToken cross-chain powered by Helix Bridge.",
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
@@ -26,9 +26,9 @@ export default function RootLayout({ children }: { children: React.ReactNode })
-
+ {/* */}
{children}
-
+ {/* */}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index ae42f323..09146587 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,12 +1,7 @@
-import PageWrap from "@/ui/page-wrap";
import dynamic from "next/dynamic";
-const Transfer = dynamic(() => import("@/components/transfer"), { ssr: false });
+const PageSelect = dynamic(() => import("@/components/page-select"), { ssr: false });
-export default function HomePage() {
- return (
-
-
-
- );
+export default function Home() {
+ return ;
}
diff --git a/src/app/records/[id]/page.tsx b/src/app/records/[id]/page.tsx
index 15c72510..1ca3efa7 100644
--- a/src/app/records/[id]/page.tsx
+++ b/src/app/records/[id]/page.tsx
@@ -1,3 +1,5 @@
+import Footer from "@/components/footer";
+import Header from "@/components/header";
import RecordDetail from "@/components/record-detail";
import PageWrap from "@/ui/page-wrap";
@@ -9,8 +11,12 @@ interface Props {
export default function RecordPage({ params }: Props) {
return (
-
-
-
+ <>
+
+
+
+
+
+ >
);
}
diff --git a/src/app/records/page.tsx b/src/app/records/page.tsx
index b6d9be8d..dc7c10ac 100644
--- a/src/app/records/page.tsx
+++ b/src/app/records/page.tsx
@@ -1,3 +1,5 @@
+import Footer from "@/components/footer";
+import Header from "@/components/header";
import PageWrap from "@/ui/page-wrap";
import dynamic from "next/dynamic";
@@ -5,8 +7,12 @@ const HistoryRecords = dynamic(() => import("@/components/history-records"));
export default function RecordsPage() {
return (
-
-
-
+ <>
+
+
+
+
+
+ >
);
}
diff --git a/src/components/chain-switch.tsx b/src/components/chain-switch.tsx
new file mode 100644
index 00000000..af6c045b
--- /dev/null
+++ b/src/components/chain-switch.tsx
@@ -0,0 +1,32 @@
+import { getChainConfigs } from "@/utils";
+import { offset, useClick, useDismiss, useFloating, useInteractions, useTransitionStyles } from "@floating-ui/react";
+import { useMemo, useState } from "react";
+import { useNetwork } from "wagmi";
+
+const chainOptions = getChainConfigs();
+
+export default function ChainSwitch() {
+ const [isOpen, setIsOpen] = useState(false);
+ const { refs, context, floatingStyles } = useFloating({
+ open: isOpen,
+ onOpenChange: setIsOpen,
+ middleware: [offset(6)],
+ });
+ const { styles, isMounted } = useTransitionStyles(context, {
+ initial: { transform: "translateY(-10px)", opacity: 0 },
+ open: { transform: "translateY(0)", opacity: 1 },
+ close: { transform: "translateY(-10px)", opacity: 0 },
+ });
+ const click = useClick(context);
+ const dismiss = useDismiss(context);
+ const { getReferenceProps, getFloatingProps } = useInteractions([click, dismiss]);
+
+ const { chain } = useNetwork();
+ // const activeChain = useMemo(() => chainOptions.find((option) => option.id === chain?.id))
+
+ return (
+ <>
+
+ >
+ );
+}
diff --git a/src/components/footer.tsx b/src/components/footer.tsx
index e3527a7c..c708ce1d 100644
--- a/src/components/footer.tsx
+++ b/src/components/footer.tsx
@@ -1,71 +1,43 @@
-"use client";
-
import Image from "next/image";
-import { PropsWithChildren, useEffect, useState } from "react";
+import { PropsWithChildren } from "react";
export default function Footer() {
- const [mainnetOrTestnet, setMainnetOrTestnet] = useState<{ label: "Mainnet" | "Testnet"; link: string }>();
-
- useEffect(() => {
- if (window.location.hostname === "helixbridge.app") {
- setMainnetOrTestnet({ label: "Testnet", link: "https://testnet.helixbridge.app" });
- } else if (window.location.hostname === "testnet.helixbridge.app") {
- setMainnetOrTestnet({ label: "Mainnet", link: "https://helixbridge.app" });
- } else if (window.location.hostname === "helix-stg.vercel.app") {
- setMainnetOrTestnet({ label: "Testnet", link: "https://helix-stg-test.vercel.app" });
- } else if (window.location.hostname === "helix-stg-test.vercel.app") {
- setMainnetOrTestnet({ label: "Mainnet", link: "https://helix-stg.vercel.app" });
- } else if (window.location.hostname === "helix-dev-main.vercel.app") {
- setMainnetOrTestnet({ label: "Testnet", link: "https://helix-dev-test.vercel.app" });
- } else if (window.location.hostname === "helix-dev-test.vercel.app") {
- setMainnetOrTestnet({ label: "Mainnet", link: "https://helix-dev-main.vercel.app" });
- }
- }, []);
-
return (
-
-
- {/* Copyright */}
-
{`© ${new Date().getFullYear()} Helix Bridge`}
-
-
-
-
+
+
{`© ${new Date().getFullYear()} Powered by Helix Bridge`}
+
+
);
diff --git a/src/components/header.tsx b/src/components/header.tsx
index c2afb2a6..7d35ceb4 100644
--- a/src/components/header.tsx
+++ b/src/components/header.tsx
@@ -32,67 +32,58 @@ export default function Header() {
return (
<>
-
-
- {/* Left */}
-
- {/* Logo */}
-
-
-
-
-
- {isProduction() ? "xToken" : "testnet"}
-
-
-
- {/* Navigations */}
-
- {navigationsConfig.map(({ href, label, external, soon, disabled }) =>
- external ? (
-
- {label}
-
- ) : soon || disabled ? (
-
- {label}
-
- ) : (
-
- {label}
-
- ),
- )}
-
-
+
+ {/* Left */}
+
+
+
+
- {/* Right */}
-
-
-
+ {navigationsConfig.map(({ href, label, external, soon, disabled }) =>
+ external ? (
+
+ {label}
+
+ ) : soon || disabled ? (
+
+ {label}
+
+ ) : (
+
+ {label}
+
+ ),
+ )}
-
+
+ {/* Right */}
+
+
+
+
+
+
diff --git a/src/components/home-page.tsx b/src/components/home-page.tsx
new file mode 100644
index 00000000..cfa28669
--- /dev/null
+++ b/src/components/home-page.tsx
@@ -0,0 +1,79 @@
+import Image from "next/image";
+import { PropsWithChildren } from "react";
+
+export default function HomePage() {
+ return (
+
+
+
+
+
+ Fully Open-Source and Decentralized Cross-Chain Asset Bridge
+
+
+ Built on top of common messaging bridges that already exist between chains, and provides secure, fast, and
+ low-cost cross-chain functionality for users.
+
+
+
+
+
+
+
+
+
+
{`© ${new Date().getFullYear()} Helix Bridge`}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+function Card({ icon, link, label, external }: { icon: string; link: string; label: string; external?: boolean }) {
+ return (
+
+
+
+ {label}
+ {`>`}
+
+
+ );
+}
+
+function Social({ children, href }: PropsWithChildren<{ href: string }>) {
+ return (
+
+ {children}
+
+ );
+}
diff --git a/src/components/page-select.tsx b/src/components/page-select.tsx
new file mode 100644
index 00000000..7c2c640a
--- /dev/null
+++ b/src/components/page-select.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import HomePage from "./home-page";
+import ProjectPage from "./project-page";
+
+const isHomePage = !window.location.hostname.split(".").includes("darwinia");
+
+export default function PageSelect() {
+ return isHomePage ? : ;
+}
diff --git a/src/components/project-page.tsx b/src/components/project-page.tsx
new file mode 100644
index 00000000..c0fc0ba7
--- /dev/null
+++ b/src/components/project-page.tsx
@@ -0,0 +1,18 @@
+import PageWrap from "@/ui/page-wrap";
+import dynamic from "next/dynamic";
+import Header from "./header";
+import Footer from "./footer";
+
+const Transfer = dynamic(() => import("@/components/transfer"), { ssr: false });
+
+export default function ProjectPage() {
+ return (
+ <>
+
+
+
+
+
+ >
+ );
+}
diff --git a/src/components/user.tsx b/src/components/user.tsx
index 70fd75a8..76eac90a 100644
--- a/src/components/user.tsx
+++ b/src/components/user.tsx
@@ -85,7 +85,7 @@ export default function User({ placement, prefixLength = 10, suffixLength = 8, o
.map((balance) => (
{
const _sourceChain = balance.chain;
@@ -144,7 +144,7 @@ export default function User({ placement, prefixLength = 10, suffixLength = 8, o
}
function LabelSpan({ children }: PropsWithChildren) {
- return {children} ;
+ return {children} ;
}
function ChildSpan({ children }: PropsWithChildren) {
diff --git a/src/providers/rainbow-provider.tsx b/src/providers/rainbow-provider.tsx
index 74ef1e4b..5a8a8d9e 100644
--- a/src/providers/rainbow-provider.tsx
+++ b/src/providers/rainbow-provider.tsx
@@ -36,7 +36,7 @@ export default function RainbowProvider({ children }: PropsWithChildren
return (
diff --git a/src/ui/drawer.tsx b/src/ui/drawer.tsx
index 8b10bc3c..b2cf3044 100644
--- a/src/ui/drawer.tsx
+++ b/src/ui/drawer.tsx
@@ -49,7 +49,7 @@ export default function Drawer({