Skip to content

Commit d907403

Browse files
authored
replace img with nextjs Image component (#20)
* replace img with nextjs Image component * Hotfix: fix linting issue
1 parent dcc418b commit d907403

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

packages/nextjs/app/builders/0xd1B41bE30F980315b8A6b754754aAa299C7abea2/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1+
import Image from "next/image";
2+
import profileUrl from "./_assets/RolandTheFrank.jpg";
13
import { GitHubIcon, LinkedInIcon, TwitterIcon, YouTubeIcon } from "./profileLinks";
24
import type { NextPage } from "next";
35
import { Address } from "~~/components/scaffold-eth";
46

5-
const profileUrl = "https://pbs.twimg.com/media/Ey8oK6gXMAUKrEX.jpg";
6-
77
const RolandTheFrank: NextPage = () => {
88
return (
99
<div className="flex items-center flex-col flex-grow pt-10">
1010
<div className="w-96 px-6 py-6 text-center bg-gray-800 rounded-lg lg:mt-0 xl:px-10">
1111
<div className="space-y-4 xl:space-y-6 pt-8">
12-
<img className="mx-auto rounded-full h-36 w-36" src={profileUrl} alt="author avatar" />
12+
<div className="mx-auto rounded-full h-36 w-36 overflow-hidden">
13+
<Image alt="author avatar" width={144} height={144} src={profileUrl} className="object-cover" />
14+
</div>
1315
<div className="space-y-2">
1416
<div className="flex justify-center items-center flex-col space-y-3 text-lg font-medium leading-6">
1517
<h3 className="text-amber-50">

packages/nextjs/app/builders/0xfb8b972b0D1cF9BB242A40F7AEA8E9a1bF89E0E3/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
22
import Image from "next/image";
3-
import { NextPage } from "next";
3+
import { NextPage } from "next";
44

5-
const Zeze : NextPage = () => {
5+
const Zeze: NextPage = () => {
66
return (
77
<>
88
<div className="basis-full md:basis-1/2 flex justify-center items-center h-screen">
@@ -52,4 +52,4 @@ const Zeze : NextPage = () => {
5252
);
5353
};
5454

55-
export default Zeze
55+
export default Zeze;

0 commit comments

Comments
 (0)