Skip to content

Commit

Permalink
feature: Remove address from the Summary (#34)
Browse files Browse the repository at this point in the history
* address copy

* rm address from summary completely

* patch
  • Loading branch information
gbarkhatov authored Aug 6, 2024
1 parent 20f8ed6 commit d053114
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 25 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-staking",
"version": "0.2.29",
"version": "0.2.30",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
31 changes: 10 additions & 21 deletions src/app/components/Summary/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ import { FaBitcoin } from "react-icons/fa";
import { getNetworkConfig } from "@/config/network.config";
import { satoshiToBtc } from "@/utils/btcConversions";
import { maxDecimals } from "@/utils/maxDecimals";
import { trim } from "@/utils/trim";
import { Network } from "@/utils/wallet/wallet_provider";

import { LoadingSmall } from "../Loading/Loading";

interface SummaryProps {
address: string;
totalStakedSat: number;
btcWalletBalanceSat?: number;
}

export const Summary: React.FC<SummaryProps> = ({
address,
totalStakedSat,
btcWalletBalanceSat,
}) => {
Expand Down Expand Up @@ -51,26 +48,18 @@ export const Summary: React.FC<SummaryProps> = ({
<LoadingSmall text="Loading..." />
)}
</div>
<p className="hidden xl:flex xl:text-sm 2xl:ml-2">{trim(address)}</p>
{!onMainnet && (
<a
href="https://discord.com/invite/babylonglobal"
target="_blank"
rel="noopener noreferrer"
className="font-light text-primary hover:underline text-right lg:text-left"
>
Get Test Tokens
</a>
)}
</div>
</div>
<div
className={`divider m-0 xl:divider-horizontal xl:m-0 ${onMainnet && "xl:hidden"}`}
/>
<div className="flex justify-between gap-2 text-sm">
<p className="xl:hidden">{trim(address)}</p>
{/* Not visible on Mainnet */}
{!onMainnet && (
<a
href="https://discord.com/invite/babylonglobal"
target="_blank"
rel="noopener noreferrer"
className="font-light text-primary hover:underline"
>
Get Test Tokens
</a>
)}
</div>
</div>
);
};
1 change: 0 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ const Home: React.FC<HomeProps> = () => {
<Stats />
{address && (
<Summary
address={address}
totalStakedSat={totalStakedSat}
btcWalletBalanceSat={btcWalletBalanceSat}
/>
Expand Down

0 comments on commit d053114

Please sign in to comment.