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 2 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
14 changes: 13 additions & 1 deletion src/app/screens/Options/TestConnection/card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { useTranslation } from "react-i18next";

type Props = {
alias: string;
accountName: string;
satoshis: string;
fiat?: string;
color: string;
Expand All @@ -8,14 +11,23 @@ type Props = {

export default function TestConnectionResultCard({
alias,
accountName,
satoshis,
fiat,
color,
currency,
}: Props) {
const { t } = useTranslation("translation", {
keyPrefix: "welcome.test_connection",
});
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="font-normal text-black ml-6 dark:text-white break-words">
{t("account_name", { accountName })}
</p>
<p className="font-normal text-black ml-6 dark:text-white">
{t("alias", { alias })}
</p>
<p className="text-2xl font-bold text-black ml-6 mt-2 dark:text-white">
{satoshis}
</p>
Expand Down
3 changes: 2 additions & 1 deletion src/app/screens/Options/TestConnection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,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
4 changes: 3 additions & 1 deletion src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"contact_support": "If you need help please contact [email protected]",
"actions": {
"delete_edit_account": "Delete invalid account and edit again"
}
},
"account_name": "Account Name: {{accountName}}",
"alias": "Alias: {{alias}}"
},
"pin_extension": {
"title": "Pin your Alby extension",
Expand Down
Loading