Skip to content

Commit b1cbcfd

Browse files
Merge pull request lfglabs-dev#1133 from cryptogru812/fix-1112
feat: Refont of confirmation page when you enable subscription - Add the title “Your subscription is active!”
2 parents 8b1e0c1 + 64c67fc commit b1cbcfd

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

components/domains/autorenewal.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030
} from "../../utils/constants";
3131
import RegisterCheckboxes from "../domains/registerCheckboxes";
3232
import { utils } from "starknetid.js";
33-
import RegisterConfirmationModal from "../UI/registerConfirmationModal";
3433
import ConnectButton from "../UI/connectButton";
3534
import {
3635
getAutoRenewAllowance,
@@ -57,7 +56,6 @@ const Subscription: FunctionComponent = () => {
5756
const [displayedCurrencies, setDisplayedCurrencies] = useState<
5857
CurrencyType[]
5958
>([CurrencyType.ETH, CurrencyType.STRK]);
60-
const [isTxModalOpen, setIsTxModalOpen] = useState(false);
6159
const [termsBox, setTermsBox] = useState<boolean>(true);
6260
const [renewalBox, setRenewalBox] = useState<boolean>(true);
6361
const [salt, setSalt] = useState<string | undefined>();
@@ -131,7 +129,7 @@ const Subscription: FunctionComponent = () => {
131129
status: "pending",
132130
},
133131
});
134-
setIsTxModalOpen(true);
132+
router.push("/subscriptionConfirmation");
135133
// eslint-disable-next-line react-hooks/exhaustive-deps
136134
}, [autorenewData]); // We only need renewData here because we don't want to send the metadata twice (we send it once the tx is sent)
137135

@@ -387,11 +385,6 @@ const Subscription: FunctionComponent = () => {
387385
</div>
388386
</div>
389387
<img className={styles.image} src="/visuals/register.webp" />
390-
<RegisterConfirmationModal
391-
txHash={autorenewData?.transaction_hash}
392-
isTxModalOpen={isTxModalOpen}
393-
closeModal={() => window.history.back()}
394-
/>
395388
<Notification
396389
visible={currencyError}
397390
onClose={() => setCurrencyError(false)}

pages/subscriptionConfirmation.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from "react";
2+
import { NextPage } from "next";
3+
import styles from "../styles/components/confirmation.module.css";
4+
5+
const SubscriptionConfirmation: NextPage = () => {
6+
return (
7+
<>
8+
<div className={styles.container}>
9+
<div>
10+
<div className={styles.title}>
11+
Your subscription is <br className="hidden sm:block" />
12+
<span className={styles.highlight}>active!</span>
13+
</div>
14+
</div>
15+
</div>
16+
</>
17+
);
18+
};
19+
20+
export default SubscriptionConfirmation;

0 commit comments

Comments
 (0)