import { permanentRedirect } from "next/navigation";

import { getLocalizedPath, resolveLocale } from "@/lib/locale";

type PortfolioCategoryIndexPageProps = {
  params: Promise<{
    locale: string;
  }>;
};

export default async function PortfolioCategoryIndexPage({
  params,
}: PortfolioCategoryIndexPageProps) {
  const { locale } = await params;
  const localeKey = resolveLocale(locale);

  permanentRedirect(getLocalizedPath(localeKey, "/portfolio"));
}
