This repository has been archived by the owner on Apr 17, 2024. It is now read-only.
forked from helix-bridge/helix-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: home page * feat: darwinia project page * fix: fix home page select * refactor: update website title * refactor: update menu.svg fill color * refactor: update drawer brand logo
- Loading branch information
1 parent
a4d4a0e
commit 246886d
Showing
19 changed files
with
260 additions
and
157 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<PageWrap> | ||
<Transfer /> | ||
</PageWrap> | ||
); | ||
export default function Home() { | ||
return <PageSelect />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
import Footer from "@/components/footer"; | ||
import Header from "@/components/header"; | ||
import PageWrap from "@/ui/page-wrap"; | ||
import dynamic from "next/dynamic"; | ||
|
||
const HistoryRecords = dynamic(() => import("@/components/history-records")); | ||
|
||
export default function RecordsPage() { | ||
return ( | ||
<PageWrap> | ||
<HistoryRecords /> | ||
</PageWrap> | ||
<> | ||
<Header /> | ||
<PageWrap> | ||
<HistoryRecords /> | ||
</PageWrap> | ||
<Footer /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<> | ||
<button ref={refs.setReference} {...getReferenceProps()}></button> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<div className="app-footer w-full"> | ||
<div className="mx-auto flex h-full max-w-8xl shrink-0 items-center justify-center px-middle"> | ||
{/* Copyright */} | ||
<span className="text-sm font-medium text-white/50">{`© ${new Date().getFullYear()} Helix Bridge`}</span> | ||
|
||
<div className="mx-3 h-4 w-[1px] bg-white/30 lg:mx-5 lg:bg-transparent" /> | ||
|
||
<div className="flex shrink-0 items-center gap-middle lg:gap-5"> | ||
<a | ||
className="text-sm font-medium text-white/50 transition hover:text-white active:scale-95" | ||
href="https://docs.helixbridge.app/" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
Docs | ||
</a> | ||
|
||
{mainnetOrTestnet && ( | ||
<a | ||
className="text-sm font-medium text-white/50 transition hover:text-white active:scale-95" | ||
href={mainnetOrTestnet.link} | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
{mainnetOrTestnet.label} | ||
</a> | ||
)} | ||
|
||
<div className="hidden h-4 w-[1px] bg-white/30 lg:block" /> | ||
|
||
<SocialLink href="https://github.com/helix-bridge"> | ||
<Image width={18} height={18} alt="Github" src="/images/social/github.svg" /> | ||
</SocialLink> | ||
<SocialLink href="https://twitter.com/helixbridges"> | ||
<Image width={18} height={18} alt="Twitter" src="/images/social/twitter.svg" /> | ||
</SocialLink> | ||
<SocialLink href="https://discord.gg/6XyyNGugdE"> | ||
<Image width={22} height={22} alt="Discord" src="/images/social/discord.svg" /> | ||
</SocialLink> | ||
<SocialLink href="mailto:[email protected]"> | ||
<Image width={18} height={18} alt="Email" src="/images/social/email.svg" /> | ||
</SocialLink> | ||
</div> | ||
<div className="app-footer flex items-center justify-center px-middle lg:justify-between lg:px-5"> | ||
<span className="text-xs font-semibold text-white/50">{`© ${new Date().getFullYear()} Powered by Helix Bridge`}</span> | ||
|
||
<div className="hidden items-center gap-5 lg:flex"> | ||
<a | ||
className="text-xs font-semibold text-white/50 transition hover:text-white active:scale-95" | ||
href="https://assethub-bridge.darwinia.network/" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
Assethub Bridge | ||
</a> | ||
<a | ||
className="text-xs font-semibold text-white/50 transition hover:text-white active:scale-95" | ||
href="https://docs.helixbridge.app/" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
Docs | ||
</a> | ||
|
||
<div className="h-3 w-[1px] bg-white/30" /> | ||
|
||
<SocialLink href="https://github.com/helix-bridge"> | ||
<Image width={16} height={16} alt="Github" src="/images/social/github.svg" /> | ||
</SocialLink> | ||
<SocialLink href="https://twitter.com/helixbridges"> | ||
<Image width={16} height={16} alt="Twitter" src="/images/social/twitter.svg" /> | ||
</SocialLink> | ||
<SocialLink href="https://discord.gg/6XyyNGugdE"> | ||
<Image width={20} height={20} alt="Discord" src="/images/social/discord.svg" /> | ||
</SocialLink> | ||
<SocialLink href="mailto:[email protected]"> | ||
<Image width={16} height={16} alt="Email" src="/images/social/email.svg" /> | ||
</SocialLink> | ||
</div> | ||
</div> | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.