diff --git a/app/premium/success/page.tsx b/app/premium/success/page.tsx index 1eb45f6..4dd9cc9 100644 --- a/app/premium/success/page.tsx +++ b/app/premium/success/page.tsx @@ -1,14 +1,16 @@ -// TODO remove the use client directive in favor of a server component -'use client' -import { useSearchParams } from 'next/navigation' import { Button } from '@/components/ui/button' +import { ExternalLink } from 'lucide-react' import Head from 'next/head' +import Link from 'next/link' -export default function Premium() { - const searchParams = useSearchParams() - - const type = searchParams.get('type') - const serverId = searchParams.get('server') +export default function Premium({ + searchParams +}: { + searchParams: { [key: string]: string | string[] | undefined } +}) { + const type = searchParams.type ? (searchParams.type as string) : 'unknown' + const serverId = + searchParams.server ? (searchParams.server as string) : 'unknown' return ( <> @@ -20,22 +22,25 @@ export default function Premium() { Payment Successful!
- Your payment for Would You Premium billed{' '} - {type === 'monthly' ? 'monthly' : 'annually'} was successful! + Your payment for Would You Premium billed {type} was + successful!
{ // TODO: Add space between the premium text } - +