Skip to content

Commit

Permalink
feat: alby hub promotion banner
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Nov 20, 2024
1 parent fa670bf commit c8d2a70
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/app/components/Alert/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { classNames } from "~/app/utils";

type Props = {
type: "warn" | "info";
type: "warn" | "info" | "promotion";
children: React.ReactNode;
};

Expand All @@ -13,7 +13,8 @@ export default function Alert({ type, children }: Props) {
type == "warn" &&
"text-orange-700 dark:text-orange-300 bg-orange-50 dark:bg-orange-900 border-orange-100 dark:border-orange-900",
type == "info" &&
"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-100 dark:border-blue-900"
"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-100 dark:border-blue-900",
type == "promotion" && "border-2 border-[#f8c455] bg-primary-gradient"
)}
>
{children}
Expand Down
20 changes: 20 additions & 0 deletions src/app/screens/Home/DefaultView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,26 @@ const DefaultView: FC<Props> = (props) => {
)}

<div className="flex flex-col gap-4 p-4">
<Alert type="promotion">
<span className="text-sm">
<Trans
i18nKey={"default_view.upgrade_to_alby_hub"}
t={t}
components={[
// eslint-disable-next-line react/jsx-key
<p className="text-center font-semibold"></p>,
// eslint-disable-next-line react/jsx-key
<Hyperlink
className="underline"
href="https://albyhub.com/"
target="_blank"
rel="noreferrer"
/>,
]}
/>
</span>
</Alert>

{isBlockedUrl && (
<div className="items-center dark:text-white text-sm">
<Alert type="info">
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@
"description": "Fund your account and receive via your lightning address or an invoice"
}
},
"upgrade_account": "You are using the old LNDHub setup. <0>Please re-connect</0> your Alby account to get access to the latest features."
"upgrade_account": "You are using the old LNDHub setup. <0>Please re-connect</0> your Alby account to get access to the latest features.",
"upgrade_to_alby_hub": "<0>Experience Bitcoin with Alby Hub!</0> Your self-custodial wallet for instant payments, app connectivity, and 24/7 online access—<1>Get Started Here</1>! 🐝💛"
}
},
"accounts": {
Expand Down

0 comments on commit c8d2a70

Please sign in to comment.