diff --git a/frontend/src/app/projects/layout.tsx b/frontend/src/app/projects/[projectSlug]/layout.tsx similarity index 100% rename from frontend/src/app/projects/layout.tsx rename to frontend/src/app/projects/[projectSlug]/layout.tsx diff --git a/frontend/src/app/projects/[projectSlug]/page.tsx b/frontend/src/app/projects/[projectSlug]/page.tsx index b6d3276..3062aae 100644 --- a/frontend/src/app/projects/[projectSlug]/page.tsx +++ b/frontend/src/app/projects/[projectSlug]/page.tsx @@ -73,36 +73,38 @@ export default async function Page({ projectTitle = STRAPI_URL + projectTitle; } return ( -
+
{graphqlData.data.projects?.data[0].attributes?.satellites?.data .length != 0 && ( -

- Related Satellites -

+ <> +
+

Related Satellites

+
+
+ {graphqlData.data.projects?.data[0].attributes?.satellites?.data.map( + (satellite: any) => { + const previewImage = + satellite?.attributes?.previewImage?.data + ?.attributes?.url ?? undefined; + const satelliteObject: ProjectOrSatellite = { + id: satellite.id, + title: satellite.attributes.name, + previewImage: previewImage, + slug: satellite.attributes.name, + isProject: false, + }; + return ( + + ); + }, + )} +
+ )} -
- {graphqlData.data.projects?.data[0].attributes?.satellites?.data.map( - (satellite: any) => { - const previewImage = - satellite?.attributes?.previewImage?.data - ?.attributes?.url ?? undefined; - const satelliteObject: ProjectOrSatellite = { - id: satellite.id, - title: satellite.attributes.name, - previewImage: previewImage, - slug: satellite.attributes.name, - isProject: false, - }; - return ( - - ); - }, - )} -
); } diff --git a/frontend/src/app/projects/page.tsx b/frontend/src/app/projects/page.tsx index 10f6795..6e4081a 100644 --- a/frontend/src/app/projects/page.tsx +++ b/frontend/src/app/projects/page.tsx @@ -60,7 +60,7 @@ export default async function ProjectsPage() { } return ( -
+
Our Projects @@ -70,8 +70,8 @@ export default async function ProjectsPage() {
-
- {graphqlData.data.projects.data.map((project) => { +
+ {graphqlData.data.projects.data.map((project: any) => { let previewImage = project?.attributes?.previewImage?.data?.attributes ?.url; @@ -81,11 +81,11 @@ export default async function ProjectsPage() { } return ( - +
@@ -108,10 +108,12 @@ export default async function ProjectsPage() { {project?.attributes?.title}

- {SlicePreviewText( - project?.attributes?.content ?? - [], - )} + + {SlicePreviewText( + project?.attributes + ?.content ?? [], + )} +

diff --git a/frontend/src/app/satellites/[satelliteSlug]/page.tsx b/frontend/src/app/satellites/[satelliteSlug]/page.tsx index 63b197e..30cb72b 100644 --- a/frontend/src/app/satellites/[satelliteSlug]/page.tsx +++ b/frontend/src/app/satellites/[satelliteSlug]/page.tsx @@ -81,22 +81,25 @@ export default async function SatelliteInfoPage({
{/* Related projects */} - {satelliteInfo.relatedProjects?.length != 0 ? ( -
-

Related Projects

- -
- {satelliteInfo.relatedProjects?.map( - (project: ProjectOrSatellite) => ( - - ), - )} -
-
- ) : null} +
+ {satelliteInfo.relatedProjects?.length != 0 ? ( + <> +
+

Related Projects

+
+
+ {satelliteInfo.relatedProjects?.map( + (project: ProjectOrSatellite) => ( + + ), + )} +
+ + ) : null} +
); } diff --git a/frontend/src/components/RelatedProjectsAndSatellites.tsx b/frontend/src/components/RelatedProjectsAndSatellites.tsx index 3815383..4b48518 100644 --- a/frontend/src/components/RelatedProjectsAndSatellites.tsx +++ b/frontend/src/components/RelatedProjectsAndSatellites.tsx @@ -23,11 +23,11 @@ export default function RelatedProjectsAndSatellites({ return ( - + {project.title} diff --git a/frontend/src/components/shadcn/card.tsx b/frontend/src/components/shadcn/card.tsx index b07d192..91ba51c 100644 --- a/frontend/src/components/shadcn/card.tsx +++ b/frontend/src/components/shadcn/card.tsx @@ -9,7 +9,7 @@ const Card = React.forwardRef<