import { MeditationResultPage } from "@/components/domains/meditation";
import { loadPalms } from "@/entities/dashboard/loaders";

import styles from "./page.module.scss";

export default async function MeditationResult({
  params,
}: {
  params: Promise<{ id: string; resultId: string }>;
}) {
  const { id, resultId } = await params;
  // const actions = await loadMeditations();
  const actions = await loadPalms();
  const action = actions?.find(action => action._id === id);

  return (
    <section className={styles.container}>
      <MeditationResultPage id={resultId} action={action} />
    </section>
  );
}
