import { permanentRedirect } from 'next/navigation';
import { paths } from '@justice-choice/seo-engine';

/** One canonical URL per intent: /us/new-york/ → /us/new-york/lawyers/ */
export default async function CityRedirect({ params }: { params: Promise<{ country: string; city: string }> }) {
  const { country, city } = await params;
  permanentRedirect(paths.city(country, city));
}
