Skip to content

Commit

Permalink
really stupid directory reading thing please god bundle my files jesu…
Browse files Browse the repository at this point in the history
…s christ
  • Loading branch information
nofurtherinformation committed Apr 11, 2024
1 parent 13dc19c commit 219d232
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/county/[county]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ type CountyDataMap = Map<CountyDataKeys, CountyDataValues>
const CountyPage: React.FC<CountyRouteProps> = 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)
}
Expand Down

0 comments on commit 219d232

Please sign in to comment.