Skip to content

Commit

Permalink
fix: remove savings balance card
Browse files Browse the repository at this point in the history
  • Loading branch information
reneaaron committed Jun 26, 2024
1 parent b89377e commit 3dfbffe
Showing 1 changed file with 29 additions and 50 deletions.
79 changes: 29 additions & 50 deletions frontend/src/screens/channels/Channels.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
ArrowDown,
ArrowUp,
Bitcoin,
ChevronDown,
CopyIcon,
ExternalLinkIcon,
Expand Down Expand Up @@ -311,8 +310,31 @@ export default function Channels() {
</div>
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuLabel>On-Chain</DropdownMenuLabel>
<DropdownMenuItem>
{balances && (
<>
{new Intl.NumberFormat().format(
balances.onchain.spendable
)}{" "}
sats
{balances &&
balances.onchain.spendable !==
balances.onchain.total && (
<p className="text-xs text-muted-foreground animate-pulse">
+
{new Intl.NumberFormat().format(
balances.onchain.total -
balances.onchain.spendable
)}{" "}
sats incoming
</p>
)}
</>
)}
</DropdownMenuItem>
<DropdownMenuItem>
<Link
to="/channels/onchain/deposit-bitcoin"
Expand Down Expand Up @@ -354,17 +376,17 @@ export default function Channels() {
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>
{/* <Link to="/channels/new">
<Button>Open Channel</Button>
</Link> */}
<ExternalLink to="https://www.getalby.com/topup">
<Button>Buy Bitcoin</Button>
</ExternalLink>
</>
}
></AppHeader>

<div
className={cn(
"grid grid-cols-1 gap-3",
showHostedBalance ? "xl:grid-cols-4" : "lg:grid-cols-3"
showHostedBalance ? "xl:grid-cols-3" : "lg:grid-cols-2"
)}
>
{showHostedBalance && (
Expand Down Expand Up @@ -429,49 +451,6 @@ export default function Channels() {
</CardFooter>
</Card>
)}
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">
Savings Balance
</CardTitle>
<Bitcoin className="h-4 w-4 text-muted-foreground" />
</CardHeader>
<CardContent>
{!balances && (
<div>
<div className="animate-pulse d-inline ">
<div className="h-2.5 bg-primary rounded-full w-12 my-2"></div>
</div>
</div>
)}
<div className="text-2xl font-bold">
{balances && (
<>
{new Intl.NumberFormat().format(balances.onchain.spendable)}{" "}
sats
{balances &&
balances.onchain.spendable !== balances.onchain.total && (
<p className="text-xs text-muted-foreground animate-pulse">
+
{new Intl.NumberFormat().format(
balances.onchain.total - balances.onchain.spendable
)}{" "}
sats incoming
</p>
)}
</>
)}
</div>
</CardContent>
<CardFooter className="flex justify-end space-x-1">
<Link to="onchain/buy-bitcoin">
<Button variant="outline">Buy</Button>
</Link>
<Link to="onchain/deposit-bitcoin">
<Button variant="outline">Deposit</Button>
</Link>
</CardFooter>
</Card>
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">
Expand All @@ -498,7 +477,7 @@ export default function Channels() {
</CardContent>
<CardFooter className="flex justify-end">
<Link to="/channels/outgoing">
<Button variant="outline">Increase</Button>
<Button variant="outline">Top Up</Button>
</Link>
</CardFooter>
</Card>
Expand Down

0 comments on commit 3dfbffe

Please sign in to comment.