import { listGenres, type Genre } from '$lib/api/genres';
import type { PageLoad } from './$types';

export const ssr = false;

export const load: PageLoad = async () => {
    // /upload is now for new-manga creation only — additional
    // chapters land on /manga/[id]/upload-chapter via a button on the
    // manga page. The only async dep here is the curated genre list
    // for the picker.
    const genres = await listGenres();
    return { genres: genres as Genre[] };
};
