diff --git a/data/projects.ts b/data/projects.ts index ca7c54f..4c19746 100644 --- a/data/projects.ts +++ b/data/projects.ts @@ -30,9 +30,9 @@ export interface ProjectScope { } export interface ProjectScreenshot { - url: string; - width: number; - height: number; + url?: string; + width?: number; + height?: number; } export interface Link { diff --git a/src/pages/about.tsx b/src/pages/about.tsx index 208c96f..1fb98a9 100644 --- a/src/pages/about.tsx +++ b/src/pages/about.tsx @@ -79,14 +79,16 @@ function ProjectItemCompact({ project }: { project: Project }) { className='grid grid-cols-1 gap-4 p-5 md:grid-cols-3 ' >
- {project.name} + {project.screenshots.logo.url && ( + {project.name} + )}

{project.name}

diff --git a/src/pages/projects/[slug].tsx b/src/pages/projects/[slug].tsx index 47a2315..1bd03a3 100644 --- a/src/pages/projects/[slug].tsx +++ b/src/pages/projects/[slug].tsx @@ -39,13 +39,17 @@ const ProjectDetail = ({ projectDetail }: { projectDetail: Project }) => {
- {title} + {screenshots?.webScreenshot?.url ? ( + {title} + ) : ( +
+ )}
diff --git a/src/pages/projects/index.tsx b/src/pages/projects/index.tsx index 6aae2d9..415479c 100644 --- a/src/pages/projects/index.tsx +++ b/src/pages/projects/index.tsx @@ -67,13 +67,15 @@ export function ProjectListItem({
- {`${name} + {screenshots.logo.url && ( + {`${name} + )}

{subTitle}

@@ -147,13 +149,15 @@ export function ProjectGridItem({ key={id} >
- {`${name} + {screenshots.logo.url && ( + {`${name} + )}

{title}