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

@@ -121,7 +121,8 @@ const Blog = ({ loading, blog, googleAnalytics }) => {
console.error(error);
}
window.open(article.link, '_blank');
typeof window !== 'undefined' &&
window.open(article.link, '_blank');
}}
>
<div className="p-8 h-full w-full">