import { ItemService, ItemType } from "@/entities/item"; import { ItemCard } from "@/features/itemCard"; import { SectionService, SectionType } from "@/features/sections"; import { Metadata } from "next"; import Link from "next/link"; export const metadata: Metadata = { title: ".Torrent", description: ".Torrent - сервис обмена .torrent файлами видеоигр, фильмов и аудиокниг", }; export default async function Home() { const requests = SectionService.sections.map((section) => ItemService.itemsConfiguration[ SectionService.sectionsConfiguration[section].itemType ].service.GetPage(1) ); const data = await Promise.all(requests); const items = await SectionService.sections.reduce( (cards, section, i) => ({ ...cards, [section]: data[i]?.items, }), {} as { [k in SectionType]: ItemType[] | null } ); return (