Skip to content

Commit 0151fe1

Browse files
committed
refactor(preview): only show project preview if it exists
1 parent 9a94cca commit 0151fe1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/projects.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const projects: Project[] = [
7676
<path d="M24 12L18.3431 17.6569L16.9289 16.2426L21.1716 12L16.9289 7.75736L18.3431 6.34315L24 12ZM2.82843 12L7.07107 16.2426L5.65685 17.6569L0 12L5.65685 6.34315L7.07107 7.75736L2.82843 12ZM9.78845 21H7.66009L14.2116 3H16.3399L9.78845 21Z" />
7777
</svg>
7878
</a>
79-
<a
79+
{project.preview && <a
8080
target="_blank"
8181
href={project.preview}
8282
aria-label="Preview"
@@ -90,7 +90,7 @@ const projects: Project[] = [
9090
>
9191
<path d="M16.0037 9.41421L7.39712 18.0208L5.98291 16.6066L14.5895 8H7.00373V6H18.0037V17H16.0037V9.41421Z" />
9292
</svg>
93-
</a>
93+
</a>}
9494
</div>
9595
</div>
9696
</a>

0 commit comments

Comments
 (0)