import fs from "fs"; import path from "path"; export default function FilePage({ params }: { params: { path?: string[] } }) { const filePath = params.path?.join("/") || ""; // Resolve to actual file in public folder const fullPath = path.join(process.cwd(), "public", filePath); // If folder or file missing if (!fs.existsSync(fullPath)) { return (