Skip to content

Commit

Permalink
chore: handling unidentified dynamic routes (#2001)
Browse files Browse the repository at this point in the history
Signed-off-by: Tushar Saini <[email protected]>
Co-authored-by: Priyankar Pal <[email protected]>
  • Loading branch information
s2sharpit and priyankarpal authored Aug 7, 2023
1 parent 690c772 commit ce79332
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/projects/ProjectList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
import { useEffect, useState } from "react";
import Link from "next/link";
import { useParams } from "next/navigation";
import { notFound, useParams } from "next/navigation";
import { FaGithub, FaLinkedin, FaTwitter,
} from "react-icons/fa";
import { LuExternalLink } from "react-icons/lu";
Expand Down Expand Up @@ -66,9 +66,10 @@ function ProjectList() {
}
return null;
});
if (filterdObj[0]) {
setObject(filterdObj[0]);
if (!filterdObj[0]) {
notFound();
}
setObject(filterdObj[0]);
getData();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Expand Down

0 comments on commit ce79332

Please sign in to comment.