Skip to content

Commit

Permalink
feature: Add FP website (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwbabylonlab authored Jul 25, 2024
2 parents 077d20e + fd72887 commit 74c2e7d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/app/components/Staking/FinalityProviders/FinalityProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Image from "next/image";
import { AiOutlineInfoCircle } from "react-icons/ai";
import { FiGlobe } from "react-icons/fi";
import { Tooltip } from "react-tooltip";

import blue from "@/app/assets/blue-check.svg";
Expand All @@ -15,6 +16,7 @@ interface FinalityProviderProps {
commission: string;
onClick: () => void;
selected: boolean;
website?: string;
}

export const FinalityProvider: React.FC<FinalityProviderProps> = ({
Expand All @@ -24,6 +26,7 @@ export const FinalityProvider: React.FC<FinalityProviderProps> = ({
commission,
onClick,
selected,
website,
}) => {
const generalStyles =
"card relative cursor-pointer border bg-base-300 p-4 text-sm transition-shadow hover:shadow-md dark:border-transparent dark:bg-base-200";
Expand Down Expand Up @@ -53,6 +56,16 @@ export const FinalityProvider: React.FC<FinalityProviderProps> = ({
<div className="flex items-center gap-1 justify-start">
<Image src={blue} alt="verified" />
<p>{moniker}</p>
{website && (
<a
href={website}
target="_blank"
rel="noopener noreferrer"
className="text-primary btn btn-outline btn-xs ml-2 p-0 h-6 w-6"
>
<FiGlobe />
</a>
)}
</div>
) : (
<div className="flex items-center gap-1 justify-start">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const FinalityProviders: React.FC<FinalityProvidersProps> = ({
<FinalityProvider
key={fp.btcPk}
moniker={fp.description?.moniker}
website={fp.description?.website}
pkHex={fp.btcPk}
stakeSat={fp.activeTVLSat}
commission={fp.commission}
Expand Down

0 comments on commit 74c2e7d

Please sign in to comment.