---
import TutorialPage, {
  getStaticPaths as getTutorialStaticPaths,
} from '../../tutorials/[slug].astro';
import { DEFAULT_LOCALE, LANDING_LOCALES } from '../../../i18n';

export async function getStaticPaths() {
  const basePaths = await getTutorialStaticPaths();
  return LANDING_LOCALES.filter((locale) => locale.code !== DEFAULT_LOCALE).flatMap(
    (locale) =>
      basePaths.map((path) => ({
        params: { ...path.params, locale: locale.code },
        props: path.props,
      })),
  );
}
---

<TutorialPage {...Astro.props} />
