From 4fc62d6045cdc75c8d85620b2f83f45f78985657 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Tue, 9 Dec 2025 09:48:21 +0100 Subject: [PATCH] Small fool proofing --- src/components/PinnedRepos.tsx | 25 +++++++++++++------------ tsconfig.json | 24 +++++++++++++++++++----- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/components/PinnedRepos.tsx b/src/components/PinnedRepos.tsx index 87ca997..5b7cc4a 100644 --- a/src/components/PinnedRepos.tsx +++ b/src/components/PinnedRepos.tsx @@ -159,18 +159,19 @@ export default function PinnedRepos() { return (
- {pinned.map((repo, i) => ( - - ))} + {pinned && + pinned.map((repo, i) => ( + + ))}
); } catch (e: any) { diff --git a/tsconfig.json b/tsconfig.json index c133409..b575f7d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "target": "ES2017", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -11,7 +15,7 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve", + "jsx": "react-jsx", "incremental": true, "plugins": [ { @@ -19,9 +23,19 @@ } ], "paths": { - "@/*": ["./src/*"] + "@/*": [ + "./src/*" + ] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + ".next/dev/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] }