Skip to content

Commit

Permalink
fix: Add remotePatterns to next.config.js and added width and height …
Browse files Browse the repository at this point in the history
…to profile image
  • Loading branch information
phoenixpereira committed Jan 15, 2024
1 parent fcef617 commit 7ceb23d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'img.clerk.com',
},
],
},
};

module.exports = nextConfig;
4 changes: 3 additions & 1 deletion src/components/UserButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export default function UserButton() {
<div className="flex relative w-11 border-2 border-black gap-y-2">
<button onClick={handleButtonClick}>
{/* Display user's profile icon */}
{user && user.imageUrl && <Image src={user.imageUrl} alt="Profile" />}
{user && user.imageUrl && (
<Image src={user.imageUrl} alt="Profile" width={100} height={100} />
)}
</button>

{/* Popup menu */}
Expand Down

0 comments on commit 7ceb23d

Please sign in to comment.