From 2d37d065c0bd86a78e7458fa6703d343c8925a6e Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Fri, 20 Feb 2026 04:02:11 +0100 Subject: [PATCH] fix: remove CheckoutSuccessToast component and its usage in SettingsPage for cleaner settings interface --- app/settings/page.tsx | 5 ---- components/checkout/CheckoutSuccessToast.tsx | 26 -------------------- 2 files changed, 31 deletions(-) delete mode 100644 components/checkout/CheckoutSuccessToast.tsx diff --git a/app/settings/page.tsx b/app/settings/page.tsx index 030ef5c..012f348 100644 --- a/app/settings/page.tsx +++ b/app/settings/page.tsx @@ -1,6 +1,4 @@ -import { Suspense } from 'react' import ProfileSettings from '@/components/settings/ProfileSettings' -import CheckoutSuccessToast from '@/components/checkout/CheckoutSuccessToast' export const metadata = { title: 'Settings - Pulse', @@ -10,9 +8,6 @@ export const metadata = { export default function SettingsPage() { return (
- - -
) diff --git a/components/checkout/CheckoutSuccessToast.tsx b/components/checkout/CheckoutSuccessToast.tsx deleted file mode 100644 index 4bd39ac..0000000 --- a/components/checkout/CheckoutSuccessToast.tsx +++ /dev/null @@ -1,26 +0,0 @@ -'use client' - -import { useEffect } from 'react' -import { useSearchParams } from 'next/navigation' -import { toast } from '@ciphera-net/ui' - -/** - * Shows a success toast when redirected from Stripe Checkout with success=true, - * then clears the query params from the URL. - */ -export default function CheckoutSuccessToast() { - const searchParams = useSearchParams() - - useEffect(() => { - const success = searchParams.get('success') - if (success === 'true') { - toast.success('Thank you for subscribing! Your subscription is now active.') - const url = new URL(window.location.href) - url.searchParams.delete('success') - url.searchParams.delete('session_id') - window.history.replaceState({}, '', url.pathname + url.search) - } - }, [searchParams]) - - return null -}