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

feat: responsive testconnection #2973

Merged
merged 5 commits into from
Feb 28, 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
15 changes: 9 additions & 6 deletions src/app/screens/Options/TestConnection/card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
type Props = {
alias: string;
accountName: string;
satoshis: string;
fiat?: string;
color: string;
Expand All @@ -8,19 +9,21 @@ type Props = {

export default function TestConnectionResultCard({
alias,
accountName,
satoshis,
fiat,
color,
currency,
}: Props) {
return (
<div className={`${color} rounded-lg py-6 dark:bg-gray-600`}>
<p className="font-normal text-black ml-6 dark:text-white">{alias}</p>
<p className="text-2xl font-bold text-black ml-6 mt-2 dark:text-white">
{satoshis}
</p>
<div
className={`${color} rounded-lg p-5 dark:bg-gray-600 text-black dark:text-white`}
>
<p className="break-words">{accountName}</p>
<p className="text-xs break-words">{alias}</p>
<p className="text-2xl font-bold mt-2">{satoshis}</p>
{fiat && currency && (
<p className="font-normal text-white ml-6 mt-1">
<p className="text-white mt-1">
{fiat} {currency}
</p>
)}
Expand Down
16 changes: 6 additions & 10 deletions src/app/screens/Options/TestConnection/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Button from "@components/Button";
import Loading from "@components/Loading";
import { PopiconsBadgeCheckSolid } from "@popicons/react";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
Expand Down Expand Up @@ -106,15 +107,9 @@ export default function TestConnection() {

{accountInfo && accountInfo.alias && (
<div>
<div className="flex space-x-2">
<h1 className="text-2xl font-bold text-green-bitcoin">
{tCommon("success")}
</h1>
<img
src="assets/icons/star.svg"
alt="image"
className="w-8"
/>
<div className="flex space-x-2 items-center text-green-bitcoin">
<PopiconsBadgeCheckSolid className="w-8 h-8" />
<h1 className="text-2xl font-bold">{tCommon("success")}</h1>
</div>

<p className="mt-6 dark:text-gray-400"></p>
Expand All @@ -123,7 +118,8 @@ export default function TestConnection() {
<div className="mt-6">
<TestConnectionResultCard
color="bg-gray-100"
alias={`${accountInfo.name} - ${accountInfo.alias}`}
accountName={accountInfo.name}
alias={accountInfo.alias}
satoshis={
typeof accountInfo.balance === "number"
? getFormattedInCurrency(
Expand Down
Loading