Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getGravatar(obj) {
if (
!obj.email ||
typeof obj.email !== 'string' ||
obj.email.indexOf('@') === -1
) {
return defaultGravatar;
}
return gravatarUrl(obj.email);
}
const TopNavigation = ({ user, logout, hasBooks }) => (
<menu>
Dashboard
{hasBooks && (
Add New Book
)}
}>
logout()}>Logout
</menu>
);