diff --git a/frontend/src/pages/ProjectDetails.tsx b/frontend/src/pages/ProjectDetails.tsx index 7470f4de2..556c93dc9 100644 --- a/frontend/src/pages/ProjectDetails.tsx +++ b/frontend/src/pages/ProjectDetails.tsx @@ -28,31 +28,38 @@ const ProjectDetailsPage = () => { useEffect(() => { const fetchProjectData = async () => { setIsLoading(true) - const { hits } = await fetchAlgoliaData('projects', projectKey, 1, projectKey) - if (hits && hits.length > 0) { - setProject(hits[0]) + try { + const { hits } = await fetchAlgoliaData('projects', projectKey, 1, projectKey) + if (hits && hits.length > 0) { + setProject(hits[0]) + } + } catch (error) { + return error + } finally { + setIsLoading(false) } - setIsLoading(false) } fetchProjectData() }, [projectKey]) - if (isLoading) + if (isLoading) { return (
{project.description}
+{project.summary}
{project.summary}
-Type: {project.type[0].toUpperCase() + project.type.slice(1)}
@@ -96,6 +99,7 @@ const ProjectDetailsPage = () => {No recent issues.
)} -