From 9708c399fb4139e062d7c26efd92091daf1b0bb8 Mon Sep 17 00:00:00 2001 From: shuaibu-shehu Date: Sun, 21 Jul 2024 23:50:18 +0530 Subject: [PATCH 1/7] subscription cancel modal --- app/components/SubscriptionCancelModal.tsx | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 app/components/SubscriptionCancelModal.tsx diff --git a/app/components/SubscriptionCancelModal.tsx b/app/components/SubscriptionCancelModal.tsx new file mode 100644 index 00000000..aa08077a --- /dev/null +++ b/app/components/SubscriptionCancelModal.tsx @@ -0,0 +1,44 @@ +import React from 'react' +import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from './ui/dialog' +import { Button } from './ui/button' +import { useNavigate } from '@remix-run/react' + + +interface SubscripptionCancelModalProperties { + onclick?: () => void + children: React.ReactNode + onReactivateSubscription?: () => void +} + + +export default function SubscripptionCancelModal({ + children, + onclick, + onReactivateSubscription +}: SubscripptionCancelModalProperties) { + const navigate= useNavigate(); + + const onGoToDashboard = () => { + navigate('/dashboard'); +} + return ( + + + + + + + Subscription canceled + + Your subscription has been successfully canceled. If you change your mind, you can reactivate your subscription anytime + + + + + + + + + + ) +} From a9b64f063bb8f582d60ac0198a177f8ec6fc20d1 Mon Sep 17 00:00:00 2001 From: shuaibu-shehu Date: Sun, 21 Jul 2024 23:55:01 +0530 Subject: [PATCH 2/7] subscription cancel modal --- app/components/SubscriptionCancelModal.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/components/SubscriptionCancelModal.tsx b/app/components/SubscriptionCancelModal.tsx index aa08077a..b5577668 100644 --- a/app/components/SubscriptionCancelModal.tsx +++ b/app/components/SubscriptionCancelModal.tsx @@ -5,7 +5,6 @@ import { useNavigate } from '@remix-run/react' interface SubscripptionCancelModalProperties { - onclick?: () => void children: React.ReactNode onReactivateSubscription?: () => void } @@ -13,7 +12,6 @@ interface SubscripptionCancelModalProperties { export default function SubscripptionCancelModal({ children, - onclick, onReactivateSubscription }: SubscripptionCancelModalProperties) { const navigate= useNavigate(); @@ -24,7 +22,7 @@ export default function SubscripptionCancelModal({ return ( - + From 8844fc2325b38e65c790ebc72fa7394924e52e66 Mon Sep 17 00:00:00 2001 From: shuaibu-shehu Date: Mon, 22 Jul 2024 00:05:56 +0530 Subject: [PATCH 3/7] subscription cancel modal --- app/components/SubscriptionCancelModal.tsx | 63 +++++++++++----------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/app/components/SubscriptionCancelModal.tsx b/app/components/SubscriptionCancelModal.tsx index b5577668..2f127ab9 100644 --- a/app/components/SubscriptionCancelModal.tsx +++ b/app/components/SubscriptionCancelModal.tsx @@ -1,42 +1,43 @@ -import React from 'react' -import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from './ui/dialog' -import { Button } from './ui/button' -import { useNavigate } from '@remix-run/react' +import React from 'react'; +import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from './ui/dialog'; +import { Button } from './ui/button'; +import { useNavigate } from '@remix-run/react'; interface SubscripptionCancelModalProperties { - children: React.ReactNode - onReactivateSubscription?: () => void + children: React.ReactNode; + onReactivateSubscription?: () => void; } export default function SubscripptionCancelModal({ - children, - onReactivateSubscription + children, + onReactivateSubscription }: SubscripptionCancelModalProperties) { - const navigate= useNavigate(); - - const onGoToDashboard = () => { - navigate('/dashboard'); -} - return ( + const navigate = useNavigate(); + + const onGoToDashboard = () => { + navigate('/dashboard'); + } + return ( - - - - - - Subscription canceled - - Your subscription has been successfully canceled. If you change your mind, you can reactivate your subscription anytime - - - - - - - - - + + + + + + Subscription canceled + + Your subscription has been successfully canceled. If you change your mind, + you can reactivate your subscription anytime + + + + + + + + + ) } From 7682e5b7dfb5d368585223522c63d95802cce3ad Mon Sep 17 00:00:00 2001 From: shuaibu-shehu Date: Mon, 22 Jul 2024 00:11:18 +0530 Subject: [PATCH 4/7] subscription cancel modal --- app/components/SubscriptionCancelModal.tsx | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/app/components/SubscriptionCancelModal.tsx b/app/components/SubscriptionCancelModal.tsx index 2f127ab9..e1afb45d 100644 --- a/app/components/SubscriptionCancelModal.tsx +++ b/app/components/SubscriptionCancelModal.tsx @@ -1,24 +1,23 @@ import React from 'react'; +import { useNavigate } from '@remix-run/react'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from './ui/dialog'; import { Button } from './ui/button'; -import { useNavigate } from '@remix-run/react'; - -interface SubscripptionCancelModalProperties { +interface SubscriptionCancelModalProperties { children: React.ReactNode; onReactivateSubscription?: () => void; } - -export default function SubscripptionCancelModal({ +export default function SubscriptionCancelModal({ children, onReactivateSubscription -}: SubscripptionCancelModalProperties) { +}: SubscriptionCancelModalProperties) { const navigate = useNavigate(); const onGoToDashboard = () => { - navigate('/dashboard'); - } + navigate("/dashboard"); + }; + return ( @@ -26,18 +25,20 @@ export default function SubscripptionCancelModal({ - Subscription canceled + Subscription Canceled - Your subscription has been successfully canceled. If you change your mind, - you can reactivate your subscription anytime + Your subscription has been successfully canceled. If you change your mind, you can reactivate your subscription anytime - - - + + - ) + ); } From f088fcd1c513bee05fdcc4e01ae8d7d8a8d05795 Mon Sep 17 00:00:00 2001 From: shuaibu-shehu Date: Mon, 22 Jul 2024 00:16:12 +0530 Subject: [PATCH 5/7] fixing eslint --- app/components/SubscriptionCancelModal.tsx | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/app/components/SubscriptionCancelModal.tsx b/app/components/SubscriptionCancelModal.tsx index e1afb45d..2355b5db 100644 --- a/app/components/SubscriptionCancelModal.tsx +++ b/app/components/SubscriptionCancelModal.tsx @@ -1,7 +1,14 @@ -import React from 'react'; -import { useNavigate } from '@remix-run/react'; -import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from './ui/dialog'; -import { Button } from './ui/button'; +import { useNavigate } from "@remix-run/react"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "./ui/dialog"; +import { Button } from "./ui/button"; interface SubscriptionCancelModalProperties { children: React.ReactNode; @@ -10,7 +17,7 @@ interface SubscriptionCancelModalProperties { export default function SubscriptionCancelModal({ children, - onReactivateSubscription + onReactivateSubscription, }: SubscriptionCancelModalProperties) { const navigate = useNavigate(); @@ -25,11 +32,13 @@ export default function SubscriptionCancelModal({ - Subscription Canceled + Subscription canceled - Your subscription has been successfully canceled. If you change your mind, you can reactivate your subscription anytime + Your subscription has been successfully canceled. If you change your + mind, you can reactivate your subscription anytime +