Commit 71fb36ac by Arjun Jhukal

updated the minor changes

parent 7c139a43
"use client"
import { redirect } from "next/navigation";
import { useParams, useRouter } from "next/navigation";
import { useEffect } from "react";
export default async function Page(props: { params: Promise<{ slug: string }> }) {
const { slug } = await props.params;
export default function TryspeedRoot() {
const { slug } = useParams();
const router = useRouter();
useEffect(() => {
if (slug) {
console.log(slug);
router.replace(`/buy-coins/${slug}/success`);
}
}, [slug, router]);
return null;
return redirect(`/buy-coins/${slug}/success`);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment