From 7a717a5c562c37806678844d24bc8bbf5d2af4c7 Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 12 May 2023 18:49:21 +0100 Subject: [PATCH] feat: add buy subscription link to manage page --- packages/app/src/Pages/subscribe/ManageSubscription.tsx | 8 +++++++- packages/app/src/lang.json | 3 +++ packages/app/src/translations/en.json | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/app/src/Pages/subscribe/ManageSubscription.tsx b/packages/app/src/Pages/subscribe/ManageSubscription.tsx index 5da37bd4..4d13656c 100644 --- a/packages/app/src/Pages/subscribe/ManageSubscription.tsx +++ b/packages/app/src/Pages/subscribe/ManageSubscription.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { FormattedMessage } from "react-intl"; -import { Link } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom"; import PageSpinner from "Element/PageSpinner"; import useEventPublisher from "Feed/EventPublisher"; @@ -11,6 +11,7 @@ import SubscriptionCard from "./SubscriptionCard"; export default function ManageSubscriptionPage() { const publisher = useEventPublisher(); const api = new SnortApi(undefined, publisher); + const navigate = useNavigate(); const [subs, setSubs] = useState>(); const [error, setError] = useState(); @@ -39,6 +40,11 @@ export default function ManageSubscriptionPage() { {subs.map(a => ( ))} + {subs.length !== 0 && ( + + )} {subs.length === 0 && (