Skip to content

Commit

Permalink
chore: fix up connect panel text hierarchy when not connected (#1758)
Browse files Browse the repository at this point in the history
  • Loading branch information
neocybereth authored Feb 26, 2025
1 parent dca2af3 commit 6396a63
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion apps/namadillo/src/App/Common/ConnectPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { ActionButton, Image, Panel } from "@namada/components";
import { ConnectExtensionButton } from "App/Common/ConnectExtensionButton";
import { routes } from "App/routes";
import { useConnectText } from "hooks/useConnectText";
import { ReactNode } from "react";
import { useLocation } from "react-router-dom";
import { twMerge } from "tailwind-merge";
import { DISCORD_URL } from "urls";

Expand All @@ -13,6 +15,8 @@ export const ConnectPanel = ({
actionText?: string;
}): JSX.Element => {
const connectText = useConnectText();
const { pathname } = useLocation();
const overviewPage = pathname === routes.root;

return (
<Panel
Expand All @@ -29,8 +33,17 @@ export const ConnectPanel = ({
}
>
{children}
{actionText} {connectText}
{actionText} {!overviewPage && connectText}
</h2>
{overviewPage && (
<h4
className={
"max-w-[500px] my-0 uppercase text-center font-medium text-yellow selection:bg-yellow selection:text-black text-xl -translate-y-4"
}
>
{connectText}
</h4>
)}
<div className="flex gap-4 mx-auto w-full max-w-[400px]">
<ConnectExtensionButton />
<ActionButton
Expand Down

0 comments on commit 6396a63

Please sign in to comment.