fix: remove CheckoutSuccessToast component and its usage in SettingsPage for cleaner settings interface

This commit is contained in:
Usman Baig
2026-02-20 04:02:11 +01:00
parent 17106517d9
commit 2d37d065c0
2 changed files with 0 additions and 31 deletions

View File

@@ -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 (
<div className="min-h-screen pt-12 pb-12 px-4 sm:px-6">
<Suspense fallback={null}>
<CheckoutSuccessToast />
</Suspense>
<ProfileSettings />
</div>
)

View File

@@ -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
}