import { notFound } from 'next/navigation';
import { MultiBillEdit } from '@/app/[locale]/home/multi-bill-edit/[year]/[month]/MultiBillEdit';
import { getLocationsByMonth } from '@/app/lib/actions/monthActions';

export default async function MultiBillEditPage({ year, month }: { year: number; month: number }) {

    const locations = await getLocationsByMonth({ year, month });

    if (!locations || locations.length === 0) {
        return(notFound());
    }

    const result = <MultiBillEdit locations={locations} year={year} month={month} />;

    return (result);
}
