Support SSR

This commit is contained in:
Ariful Alam
2022-03-28 18:49:35 +06:00
parent 48f4920c1d
commit 7d9b1d9606
3 changed files with 10 additions and 6 deletions

View File

@@ -72,7 +72,7 @@ const Project = ({ repo, loading, github, googleAnalytics }) => {
console.error(error);
}
window.open(item.html_url, '_blank');
typeof window !== 'undefined' && window.open(item.html_url, '_blank');
}}
>
<div className="flex justify-between flex-col p-8 h-full w-full">