Skip to content

Commit

Permalink
feat: add Logo component
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev-JoseRonaldo committed Sep 28, 2024
1 parent 88ee31f commit 7039b27
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ const config = withPlugins([[withBundleAnalyzer({ enabled: env.ANALYZE })]], {
},
},
experimental: { instrumentationHook: true },
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'github.com',
},
]
},
rewrites() {
return [
{ source: "/healthz", destination: "/api/health" },
Expand Down
Binary file added public/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions src/components/Logo/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Image, { ImageProps } from "next/image"

interface LogoProps extends ImageProps {
size?: "large" | "medium" | "small"
}

const Logo = ({ src, alt, size = "large", ...rest }: LogoProps) => {
const dimensions =
size === "large"
? { width: 190, height: 195 }
: size === "medium"
? { width: 100, height: 103 }
: { width: 65, height: 67 }

return (
<Image
src={src}
alt={alt}
width={dimensions.width}
height={dimensions.height}
priority
className="py-4"
{...rest}
/>
)
}

export default Logo

0 comments on commit 7039b27

Please sign in to comment.