From 219d232068af4d7a107b52621d605793cee3d1da Mon Sep 17 00:00:00 2001 From: nofurtherinformation Date: Thu, 11 Apr 2024 16:21:05 -0500 Subject: [PATCH] really stupid directory reading thing please god bundle my files jesus christ --- app/county/[county]/page.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/county/[county]/page.tsx b/app/county/[county]/page.tsx index 44908e9..b3d9215 100644 --- a/app/county/[county]/page.tsx +++ b/app/county/[county]/page.tsx @@ -39,12 +39,17 @@ type CountyDataMap = Map const CountyPage: React.FC = async ({ params }) => { const county = params.county const countyDataPath = path.join(process.cwd(), "public", "data", `county_summary_stats.msgpack`) - const contentPath = path.join(process.cwd(), "content", `page`) - console.log(contentPath) + const contentPaths = [ + path.join(process.cwd(), "nav", `page`), + path.join(process.cwd(), "content", `page`), + path.join(process.cwd(), "public", `page`), + ] // fs read files in contentPath try { - const files = fs.readdirSync(contentPath) - console.log(files) + contentPaths.forEach(contentPath => { + const files = fs.readdirSync(contentPath) + console.log(files) + }) } catch (error) { console.log(error) }