Skip to content

Commit

Permalink
Fix bridge link
Browse files Browse the repository at this point in the history
  • Loading branch information
Lbqds committed Nov 8, 2023
1 parent ee28251 commit 0b3b483
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions explorer/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { AppBar, Hidden, Button, Box, Link, Toolbar } from "@mui/material";
import React from "react";
import LogoLink from "./LogoLink";
import { useNetworkContext } from "../contexts/NetworkContext";

const linkStyle = { ml: 3, textUnderlineOffset: 6 };
const linkActiveStyle = { textDecoration: "underline" };

const NavBar = () => (
<AppBar
const NavBar = () => {
const { activeNetwork } = useNetworkContext()
const bridgeLink = activeNetwork.name === 'mainnet'
? "https://bridge.alephium.org"
: "https://testnet.bridge.alephium.org"
return (<AppBar
position="static"
sx={{ backgroundColor: "transparent" }}
elevation={0}
Expand All @@ -16,7 +21,7 @@ const NavBar = () => (
<Box sx={{ flexGrow: 1 }} />
<Box sx={{ display: { xs: "none", md: "block" } }}>
<Link
href={"https://testnet.bridge.alephium.org"}
href={bridgeLink}
color="inherit"
underline="hover"
sx={linkStyle}
Expand All @@ -36,6 +41,6 @@ const NavBar = () => (
<img src={hamburger} alt="menu" />
</Box> */}
</Toolbar>
</AppBar>
);
</AppBar>)
};
export default NavBar;

0 comments on commit 0b3b483

Please sign in to comment.