Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple fixes in Navbar, remove versioning and new tag #897

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/connect/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export default function Root() {
const messages = Object.values(messageConfig);
return (
<>
{versions.map(({ appName, version }, idx) => (
sebastianscatularo marked this conversation as resolved.
Show resolved Hide resolved
<meta name={appName} content={version} key={`${appName}-${version}-${idx}`} />
))}
<div>
<NewsBar messages={messages} />
<NavBar />
Expand Down
2 changes: 0 additions & 2 deletions apps/connect/src/components/atoms/Background.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import styled from "@mui/material/styles/styled";
import Glow from "./Glow";
import Elipsis from "./Elipsis";
import BuiltBy from "./BuiltBy";
import Version from "./Version";

const Container = styled("div")(() => ({
display: "flex",
Expand All @@ -25,7 +24,6 @@ export default function Background({ children }: { children: JSX.Element[] }) {
{children}
<ContainerFooter>
<BuiltBy />
<Version />
<Glow
position={{
top: "-661px",
Expand Down
28 changes: 14 additions & 14 deletions apps/connect/src/components/atoms/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import MuiAppBar from "@mui/material/AppBar";
import Hidden from "@mui/material/Hidden";
import MuiLink from "@mui/material/Link";
import MuiChip from "@mui/material/Chip";
import Toolbar from "@mui/material/Toolbar";
import styled from "@mui/material/styles/styled";
import Box from "@mui/material/Box";
Expand Down Expand Up @@ -55,17 +54,17 @@ const Link = styled(MuiLink)(({ theme }) => ({
},
}));

const Chip = styled(MuiChip)(() => ({
position: "relative",
left: "-10px",
bottom: "24px",
backgroundColor: "#3B3785",
color: "#E2E1FF",
fontSize: "10px",
fontWeight: 600,
lineHeight: "24px",
wordWrap: "break-word",
}));
// const Chip = styled(MuiChip)(() => ({
// position: "relative",
// left: "-10px",
// bottom: "24px",
// backgroundColor: "#3B3785",
// color: "#E2E1FF",
// fontSize: "10px",
// fontWeight: 600,
// lineHeight: "24px",
// wordWrap: "break-word",
// }));

const Logo = styled("img")(({ theme }) => ({
height: 68,
Expand All @@ -82,12 +81,12 @@ const Spacer = styled("div")(() => ({
width: "100vw",
}));

// const chipNew = <Chip label="NEW" size="small" />; // TODO: Add back when needed
const womrholescanButton = (
<Box>
<Link href="https://wormholescan.io" target="_blank" color="inherit">
Wormholescan
</Link>
<Chip label="NEW" size="small" />
</Box>
);

Expand All @@ -102,12 +101,13 @@ export default function NavBar() {
<Spacer />
<Hidden implementation="css" smDown>
<div style={{ display: "flex", alignItems: "center" }}>
{navBar.map(({ label, active, href }, idx) => (
{navBar.map(({ label, active, href, isBlank }, idx) => (
<Link
key={`${label}_${idx}`}
href={href}
color="inherit"
sx={{ textDecoration: active ? "underline" : "none" }}
target={isBlank ? "_blank" : "_self"}
>
{label}
</Link>
Expand Down
2 changes: 2 additions & 0 deletions apps/connect/src/configs/messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const messages: Record<string, Message> = {
</>
),
start: new Date("2024-01-17T10:00:00-05:00"), // any date in the past would be fine
ends: new Date("2024-06-20T10:00:00-05:00"),
},
cctp: {
background: "linear-gradient(20deg, #f44b1b 0%, #eeb430 100%);",
Expand Down Expand Up @@ -118,6 +119,7 @@ const messages: Record<string, Message> = {
</>
),
start: new Date(2023, 9, 20), // any date in the past would be fine
ends: new Date(2023, 9, 20), // any date in the past would be fine
},
solana: {
background: "yellow;",
Expand Down
1 change: 1 addition & 0 deletions apps/connect/src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type NavLink = {
label: string;
active?: boolean;
href: string;
isBlank?: boolean;
};

type Redirect = {
Expand Down
3 changes: 2 additions & 1 deletion apps/connect/vite.token-bridge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,8 @@ export default defineConfig({
...viteConfig?.define,
navBar: [
{ label: "Home", active: true, href: `${PUBLIC_URL}/` },
{ label: "USDC", href: USDC_BRIDGE_HREF }
{ label: "Staking", href: "https://www.tally.xyz/gov/wormhole", isBlank: true },
{ label: "USDC", href: USDC_BRIDGE_HREF },
],
redirects: {
source: [
Expand Down
2 changes: 1 addition & 1 deletion apps/connect/vite.usdc-bridge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default defineConfig({
...viteConfig?.define,
navBar: [
{ label: "Home", href: `${PUBLIC_URL}/` },
{ label: "Staking", href: "https://www.tally.xyz/gov/wormhole", isBlank: true },
{ label: "USDC", active: true, href: `${PUBLIC_URL}/usdc-bridge` },
{ label: "Rewards", href: `${PUBLIC_URL}/rewards-dashboard` }
],
wormholeConnectConfig: {
...viteConfig?.define?.wormholeConnectConfig,
Expand Down
Loading