Enables strict mode in nextjs apps (#2354)

- We need this so zod works correctly

Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
Omar LópezandPeer Richelsen authored and GitHub committed 2022-04-04 20:26:14 +00:00
1 parent 4ff21deb89
commit a7f5250b4a
25 files changed
+178 -68

No files matched your search

+2 -2
View File
@@ -11,7 +11,7 @@ export type AvatarProps = {
};
// defaultAvatarSrc from profile.tsx can't be used as it imports crypto
function defaultAvatarSrc({ md5 }) {
function defaultAvatarSrc(md5: string) {
return `https://www.gravatar.com/avatar/${md5}?s=160&d=identicon&r=PG`;
}
@@ -26,7 +26,7 @@ export function AvatarSSR(props: AvatarProps) {
if (user.avatar) {
imgSrc = user.avatar;
} else if (user.emailMd5) {
imgSrc = defaultAvatarSrc({ md5: user.emailMd5 });
imgSrc = defaultAvatarSrc(user.emailMd5);
}
return imgSrc ? <img alt={alt} className={className} src={imgSrc}></img> : null;
}