Skip to content

Commit

Permalink
feat: remove bullet points from connector path
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Oct 17, 2024
1 parent feb547c commit ebe3138
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 73 deletions.
4 changes: 1 addition & 3 deletions src/app/components/ConnectorPath/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
type Props = {
title: string;
description: string;
content: React.ReactNode;
actions: React.ReactNode;
icon: React.ReactNode;
};

function ConnectorPath({ title, icon, description, content, actions }: Props) {
function ConnectorPath({ title, icon, description, actions }: Props) {
return (
<div className="text-gray-600 dark:text-neutral-400 flex flex-col p-8 border border-gray-200 dark:border-neutral-700 rounded-2xl bg-white dark:bg-surface-02dp">
<div className="flex flex-col sm:flex-row items-center mb-4 space-x-3">
Expand All @@ -16,7 +15,6 @@ function ConnectorPath({ title, icon, description, content, actions }: Props) {
</h1>
</div>
<p className="mb-8">{description}</p>
<div className="flex flex-col space-y-4 text-sm mb-8">{content}</div>
<div className="flex gap-4 flex-col sm:flex-row mt-auto">{actions}</div>
</div>
);
Expand Down
64 changes: 2 additions & 62 deletions src/app/screens/connectors/ChooseConnectorPath/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
PopiconsCircleCheckLine,
PopiconsCircleExclamationLine,
PopiconsCircleXLine,
} from "@popicons/react";
import { Trans, useTranslation } from "react-i18next";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import Button from "~/app/components/Button";
import ConnectorPath from "~/app/components/ConnectorPath";
Expand All @@ -30,22 +25,6 @@ export default function ChooseConnectorPath() {
/>
}
description={t("alby.description")}
content={
<>
<FeatureItem type="success">
<Trans
i18nKey={"alby.point1"}
t={t}
components={[
// eslint-disable-next-line react/jsx-key
<b></b>,
]}
/>
</FeatureItem>
<FeatureItem type="success">{t("alby.point2")}</FeatureItem>
<FeatureItem type="success">{t("alby.point3")}</FeatureItem>
</>
}
actions={<ConnectAlby />}
/>
<ConnectorPath
Expand All @@ -71,15 +50,8 @@ export default function ChooseConnectorPath() {
</div>
}
description={t("other.description")}
content={
<>
<FeatureItem type="success">{t("other.point1")}</FeatureItem>
<FeatureItem type="disabled">{t("other.point2")}</FeatureItem>
<FeatureItem type="success">{t("other.point3")}</FeatureItem>
</>
}
actions={
<Link to="choose-connector" className="flex flex-1 mt-1">
<Link to="choose-connector" className="flex flex-1">
<Button tabIndex={-1} label={t("other.connect")} flex />
</Link>
}
Expand All @@ -89,35 +61,3 @@ export default function ChooseConnectorPath() {
</div>
);
}

const FeatureItem = ({
type,
children,
}: {
type: "success" | "disabled" | "warning";
children: React.ReactNode;
}) => (
<div className="flex flex-row items-center space-2">
<div className="mr-2">
{type == "success" && (
<PopiconsCircleCheckLine
key="success"
className="text-green-600 dark:text-green-400 w-6 h-6"
/>
)}
{type == "disabled" && (
<PopiconsCircleXLine
key="disabled"
className="text-gray-400 dark:text-neutral-500 w-6 h-6"
/>
)}
{type == "warning" && (
<PopiconsCircleExclamationLine
key="warning"
className="text-orange-500 w-6 h-6"
/>
)}
</div>
<div className="grow">{children}</div>
</div>
);
10 changes: 2 additions & 8 deletions src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,12 @@
"other": {
"title": "Bring Your Own Wallet",
"description": "Best if you already have a wallet or own a lightning node.",
"connect": "Find Your Wallet",
"point1": "Both self-custody and custodial options",
"point2": "No lightning and nostr address",
"point3": "Start instantly, no waiting for an invite"
"connect": "Find Your Wallet"
},
"alby": {
"title": "Alby Account",
"description": "Ideal If you would like to enjoy apps while staying in control of your bitcoin.",
"connect": "Continue with Alby Account",
"point1": "New self-custodial wallet — <0>Alby Hub</0>",
"point2": "Unique lightning and nostr address",
"point3": "Start instantly — perfect for anyone new to Bitcoin! "
"connect": "Continue with Alby Account"
}
},
"alby": {
Expand Down

0 comments on commit ebe3138

Please sign in to comment.