import fs from 'fs'; import path from 'path'; type DataItem = { title: string; description: string; data: any[]; }; type Data = { title: string; description: string; data: DataItem[]; }; export default async function Home() { // Read the JSON file const jsonDirectory = path.join(process.cwd(), 'content'); const fileContents = await fs.readFileSync(jsonDirectory + '/data.json', 'utf8'); const data: Data = JSON.parse(fileContents); return (

{data.title}

{data.description}

{data.data.map((item: DataItem, index: number) => ( ))}
Title Description
{item.title} {item.description}
); }