Open LowkeyGud opened 1 year ago
Typing any params(string) after https://issue-tracker-pied.vercel.app/issues/ sends unnecessary fetch request to database resulting runtime error as intParse fails in
app\issues[id]\page.tsx fetchUser(parseInt(params.id));
Simple solution: Check before database call
export async function generateMetadata({ params }: Props) { if (isNaN(parseInt(params.id))) notFound(); const issue = await fetchUser(parseInt(params.id));
Typing any params(string) after https://issue-tracker-pied.vercel.app/issues/ sends unnecessary fetch request to database resulting runtime error as intParse fails in
app\issues[id]\page.tsx fetchUser(parseInt(params.id));
Simple solution: Check before database call