"use client";

import { useEffect } from "react";
import { useParams, useRouter } from "next/navigation";
import { redirect } from "next/navigation";
export default function Inner() {
  const params = useParams();

  useEffect(() => {
    const ref = params?.ref;
    if (!ref) return;

    localStorage.setItem("tcg_ref", String(ref));
    redirect("/"); // or '/login'
  }, [params?.ref]);

  return null;
}
