From d01e5046d0d3a3bd8edf0ccbebf4b4161460e6ff Mon Sep 17 00:00:00 2001 From: Superior Date: Fri, 18 Oct 2024 21:22:07 +0100 Subject: [PATCH 01/14] Get the check-in count --- packages/nextjs/app/page.tsx | 87 ++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 4 deletions(-) diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index 66b7e8b..0e6dd12 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -1,10 +1,92 @@ "use client"; +import { useEffect, useState } from "react"; import Link from "next/link"; import type { NextPage } from "next"; import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; +import { useScaffoldReadContract } from "~~/hooks/scaffold-eth"; const Home: NextPage = () => { + const [counter, setCounter] = useState(); + + const { + data, + error, + isLoading: contractLoading, + } = useScaffoldReadContract({ + contractName: "BatchRegistry", + functionName: "checkedInCounter", + }); + + useEffect(() => { + if (data !== undefined) { + setCounter(Number(data)); + } + }, [data]); + + const renderContent = () => { + if (error) { + return ( +
+

Error fetching contract data: {error.message}

+
+ ); + } + + return ( +

+ Checked in builders count: + {counter !== undefined ? counter : "0"} +

+ ); + }; + + if (contractLoading) { + return ( +
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+ {[...Array(6)].map((_, index) => ( +
+ ))} +
+ +
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+
+ ); + } + return ( <>
@@ -14,10 +96,7 @@ const Home: NextPage = () => { Batch 10

Get started by taking a look at your batch GitHub repository.

-

- Checked in builders count: - To Be Implemented -

+ {renderContent()}
From 6b92c686e867d79af2ea389060f66757fdd8b263 Mon Sep 17 00:00:00 2001 From: Peter Date: Sat, 19 Oct 2024 19:44:24 +0200 Subject: [PATCH 02/14] chore: avatar asset --- ...ED2B302ec2c2B6f063C4caF7abcB062e0-avatar.jpg | Bin 0 -> 11816 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 packages/nextjs/public/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0-avatar.jpg diff --git a/packages/nextjs/public/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0-avatar.jpg b/packages/nextjs/public/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0-avatar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fb03ad9e612c1edc9c3dba2565c08c518bcb46c5 GIT binary patch literal 11816 zcmch71yoeqzwjBlVd#dT1OWwx?v@S-De3MKkOoQVkdROiX(W{p=@by8OIiu(Zr*_2 zEBD?1TkCt@THkl}S$p>Wb(}r>{PxV%_|+VMBPT5@4S+y!fE%mkU_9g!q{er&qqLTt4(i!iyva zbN^%omGlRDoEnjPhs_(wu#%h*}f2`)n<*Jux~Xlw?nC5a45$G8WNzvs`nZ=?t`-C{&Z zH1U!q)up7k^gLa)bj9$$!GT&f!{ogrCo8Ob;HT>X%Wp9tp*1e@_Ln-Vk|YwJHUXe) z2Xmopxr2oox=g2?>63-%o=5=^J+Yay7_3HWJVyI1@9~vtw}EMj-9JJwED&`g7ll8q zO6scs@Q=VQCMw7i+mlCpUrMt&+%BW>>UfnlvB=(UJ5wm*NtMr;@KUS>o78T)Nwm(C zBmXUj_zPM!Nr#WuU|3bknKyR*$vL=0)b`vBTj&*JeTT9i{Eu#y3SKv3@`Tr+F;I-N znB}xdsP`{PpvdRd%RiTe%l-nuKCwSaBMRk+$Nvq2D>*qk?l1m(j;xk^e=CEtU8c3+ z``R`(mrBQY=62PofhSW}-Dc*m=>#WTi*D2Vs!saNR` zv3nz}_kg?8;wwQhF)Xl^X9D zL_xaOeR(OoZG-iseZ$E{*kdenbZU62xin5^LgQTu|8!>QyC>2@)Ygsy(-hi+H94h{ z^fVKHTL{35e@tpKbNi8g$i23evLDLtuRQl6-PESv;;bWQ7Jl6*aWzabzTuR(LAfz6 zaA<1x;70WOq!ju%;b$M9%Ukn4w$NRtxyQm5Qzx=|4|R(;({*|Om@TpBtTpV)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8u51e-PE2}W@jN*_7^Dt260;;?a)Ld6DRIbvFNnO@-Z;NlwXh@~4bM>i zwdxrS3zblKqXOG|J(A)u%*4@vru%DSO--jJ;OS=w?B(t}?1`tD6juN?MII5&5PQD& zKDu0f2S{XQhNh%=Gauf=!~I;)EnP1{p(AT=oB}O?olKhiaCri^FgRn3fuQ@!sz zPDb%M2Sd8Xq$$-LdJNVT@GN>LBF-vhShxU|#lJ-RsF7V#!d#TfHBmXurt%r##G6!(>I^}FORV2oPQnOdUFn9~45;VKg9l}?-CG;yu7jh)z=i#? z9Van>&rMbJ3pv~Zs_-Q%=a3?U$qSb+{+g5={(SV`;1*kdg;K|y3%k(7ulYI$upNL( zJ!k?qp2NIh3y(qNfzjCw>|qN8&bk7g5HS_&HP@!ipq_p>#}t19oii(xG;}x%I-#2D zg`vA%F@u#@e3tX^BMm<;-;KZQ+!%__@C@6=*}1W+OohM3o=Hn=ko+D>?7|s(fwZ!9 z6IXsDkx67oG^F>GdSyaRk8PO&Qn!Uj$7_3n^)$Yg{z~x8{eC`)}3f5FiQLtZC8}aeU%&5M0?yFwpMMT01FFKPBd{)#t@n*Tt zM$z lz1JHmr$SqJN*olI!C10aCN&(79fFc@UQ<2sl Date: Sat, 19 Oct 2024 19:44:30 +0200 Subject: [PATCH 03/14] feat: builder profile page --- .../page.tsx | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx diff --git a/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx b/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx new file mode 100644 index 0000000..82f78e6 --- /dev/null +++ b/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx @@ -0,0 +1,64 @@ +import Image from "next/image"; +import type { NextPage } from "next"; +import { FaDiscord, FaGithub, FaTelegram } from "react-icons/fa"; + +const PeterProfile: NextPage = () => { + const socials = [ + { + name: "Telegram", + icon: , + address: "https://telegram.me/pbkompasz", + }, + { + name: "Discord", + icon: , + address: "https://discordapp.com/users/kbence9208", + }, + { + name: "GitHub", + icon: , + address: "https://github.com/pbkompasz", + }, + ]; + + return ( +
+
+ {"Profile"} +
+

Peter Kompasz

+
+

Fullstack Developer

+

+ I studied computer science at university and started working in web development. After gaining experience, + I transitioned into freelancing. Now, I’m diving into web3 and smart contract development, which I’m + really passionate about. +

+

Address: 0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0

+
+
+ {socials.map((social, id) => ( + + {social.icon} + + ))} +
+
+
+
+ ); +}; + +export default PeterProfile; From cae60bf598cb30f4afe78d60bdfc701987510e4e Mon Sep 17 00:00:00 2001 From: Superior Date: Mon, 21 Oct 2024 18:45:47 +0100 Subject: [PATCH 04/14] Refactor checked-in counter rendering logic --- packages/nextjs/app/page.tsx | 68 ++++++------------------------------ 1 file changed, 11 insertions(+), 57 deletions(-) diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index 0e6dd12..2e95e4c 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -1,16 +1,13 @@ "use client"; -import { useEffect, useState } from "react"; import Link from "next/link"; import type { NextPage } from "next"; import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; import { useScaffoldReadContract } from "~~/hooks/scaffold-eth"; const Home: NextPage = () => { - const [counter, setCounter] = useState(); - const { - data, + data: checkedInCounter, error, isLoading: contractLoading, } = useScaffoldReadContract({ @@ -18,13 +15,16 @@ const Home: NextPage = () => { functionName: "checkedInCounter", }); - useEffect(() => { - if (data !== undefined) { - setCounter(Number(data)); + const renderCheckedInCounterSection = () => { + if (contractLoading) { + return ( +
+
+
+
+ ); } - }, [data]); - const renderContent = () => { if (error) { return (
@@ -36,57 +36,11 @@ const Home: NextPage = () => { return (

Checked in builders count: - {counter !== undefined ? counter : "0"} + {checkedInCounter !== undefined ? Number(checkedInCounter) : "0"}

); }; - if (contractLoading) { - return ( -
-
-
-
-
-
-
-
- -
-
- -
-
-
- {[...Array(6)].map((_, index) => ( -
- ))} -
- -
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
- ); - } - return ( <>
@@ -96,7 +50,7 @@ const Home: NextPage = () => { Batch 10

Get started by taking a look at your batch GitHub repository.

- {renderContent()} + {renderCheckedInCounterSection()}
From 0001d03d71e7d1273af2a0588a64144b6444bd1a Mon Sep 17 00:00:00 2001 From: Favvie Date: Tue, 22 Oct 2024 04:37:42 +0100 Subject: [PATCH 05/14] feat: change batch logo, title and subtitle --- packages/nextjs/components/Header.tsx | 6 +++--- packages/nextjs/public/logo.png | Bin 0 -> 8899 bytes 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 packages/nextjs/public/logo.png diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index f24a1de..aead9dc 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -90,11 +90,11 @@ export const Header = () => {
- SE2 logo + Batch10 logo
- Scaffold-ETH - Ethereum dev stack + BATCH #10 + NextGen Builders
    diff --git a/packages/nextjs/public/logo.png b/packages/nextjs/public/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..bce63573565e6c4db8817e612f86fbfccb216d0e GIT binary patch literal 8899 zcmeHtXH=8xwr-FrQbme%DT0(xq?Z5^nkb42NGFicNgxTmBT_{KMHCbeEFc{hy$c9P z6Op1+6_94=y`49#wcTs2eeeBo&lzXzADb~UlDzGk@0`yp&kWI54RmO!*{LBA2(6wj z{2By8vPOJSQGk(-f$o0l&s*zi+6crUEB&8*!rNzMtahxw2kMI#k53PEU2sL%x$tT_VeMQ|yn1#(x(l8- zCo~F&mgxMk_dT8S)`1(th|)H zxQv_}Qe4qaURqq*9)*&VIWH}zU}yj9tlzi%%Sqa{;2>FPS!p?0MJX96c|}iW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|L zEC7=7?i1>rPnB80?~$3i>~Y$zUw%8z6SQ>(^amtCH*RfloClB!&>6|j$!TnfWlcy< zjs%5utP7`FkVY7O1=c z5UGf6@TvstiLB(HqoHZGKHM?Mz7gO*PenA6fqrD80$Q&47x@rQn(8~g#>x;o)@~mpv0o4QjoTg&CR`==7(`<3tvF~D|q8jdB zfki()@33N7dEY&^pny=~%?O7Js6I7_v}?T!SQeW+dPE&G>)6@Z2`)dTrf%zS`;vjK z6d31B3s}+H+Zn7c(`*534yf{k69%KBuYbbK-2Ch8>~T=Jtr13t$507mM3F%sTFc|# zx*h#L({tM9wihKY7 literal 0 HcmV?d00001 From c3ac9f2bff9466e81393b92a7b6f68125dfe9d8b Mon Sep 17 00:00:00 2001 From: Superior Date: Wed, 23 Oct 2024 13:50:22 +0100 Subject: [PATCH 06/14] Refactor checked-in counter rendering logic and error handling --- packages/nextjs/app/page.tsx | 44 ++++++++++++++---------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index 2e95e4c..e223d89 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -15,32 +15,6 @@ const Home: NextPage = () => { functionName: "checkedInCounter", }); - const renderCheckedInCounterSection = () => { - if (contractLoading) { - return ( -
    -
    -
    -
    - ); - } - - if (error) { - return ( -
    -

    Error fetching contract data: {error.message}

    -
    - ); - } - - return ( -

    - Checked in builders count: - {checkedInCounter !== undefined ? Number(checkedInCounter) : "0"} -

    - ); - }; - return ( <>
    @@ -50,7 +24,23 @@ const Home: NextPage = () => { Batch 10

    Get started by taking a look at your batch GitHub repository.

    - {renderCheckedInCounterSection()} + + {error ? ( +
    +

    Error fetching contract data: {error.message}

    +
    + ) : ( +

    + Checked in builders count: + {contractLoading ? ( + +

    + + ) : ( + {checkedInCounter !== undefined ? Number(checkedInCounter) : "0"} + )} +

    + )}
    From ebc5ae9209659da901a062f603a1c7c1ff2b0c07 Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 23 Oct 2024 20:22:43 +0200 Subject: [PATCH 07/14] feat: use SE2/Address component --- .../0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx b/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx index 82f78e6..21093b4 100644 --- a/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx +++ b/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx @@ -1,6 +1,7 @@ import Image from "next/image"; import type { NextPage } from "next"; import { FaDiscord, FaGithub, FaTelegram } from "react-icons/fa"; +import { Address } from "~~/components/scaffold-eth"; const PeterProfile: NextPage = () => { const socials = [ @@ -40,7 +41,6 @@ const PeterProfile: NextPage = () => { I transitioned into freelancing. Now, I’m diving into web3 and smart contract development, which I’m really passionate about.

    -

    Address: 0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0

    {socials.map((social, id) => ( @@ -55,6 +55,7 @@ const PeterProfile: NextPage = () => { ))}
    +
From b8ffc1a061578b3c7c719ff30c33343f5a90b1f5 Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 23 Oct 2024 20:30:15 +0200 Subject: [PATCH 08/14] feat: better bio --- .../page.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx b/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx index 21093b4..067f9d1 100644 --- a/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx +++ b/packages/nextjs/app/builders/0x26BfbD8ED2B302ec2c2B6f063C4caF7abcB062e0/page.tsx @@ -37,9 +37,14 @@ const PeterProfile: NextPage = () => {

Fullstack Developer

- I studied computer science at university and started working in web development. After gaining experience, - I transitioned into freelancing. Now, I’m diving into web3 and smart contract development, which I’m - really passionate about. + Hello! I'm Peter. +
+ My journey into web3 began with studying computer science at + university, followed by a stint in web development. +
+ Currently, I'm transitioning into web3 and{" "} + smart contract development, which I'm really{" "} + passionate about

From d54e302566f2aacfce214ac0f586f01c4f4198b9 Mon Sep 17 00:00:00 2001 From: Superior Date: Wed, 23 Oct 2024 20:22:34 +0100 Subject: [PATCH 09/14] Refactor checked-in counter rendering logic and error handling --- packages/nextjs/app/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index e223d89..2ba44ec 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -30,7 +30,7 @@ const Home: NextPage = () => {

Error fetching contract data: {error.message}

) : ( -

+

Checked in builders count: {contractLoading ? ( @@ -39,7 +39,7 @@ const Home: NextPage = () => { ) : ( {checkedInCounter !== undefined ? Number(checkedInCounter) : "0"} )} -

+
)} From 663767e163e9c97b1006d0be51efd76854c63e40 Mon Sep 17 00:00:00 2001 From: krvvs <141290516+krvvs@users.noreply.github.com> Date: Thu, 24 Oct 2024 04:36:32 +0900 Subject: [PATCH 10/14] Feat: Add personal builder page --- .../components/Socials.tsx | 21 +++++++ .../page.tsx | 63 +++++++++++++++++++ packages/nextjs/next.config.js | 10 +++ 3 files changed, 94 insertions(+) create mode 100644 packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/components/Socials.tsx create mode 100644 packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx diff --git a/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/components/Socials.tsx b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/components/Socials.tsx new file mode 100644 index 0000000..5ee6cb7 --- /dev/null +++ b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/components/Socials.tsx @@ -0,0 +1,21 @@ +import Link from "next/link"; +import { FaGithub, FaXTwitter } from "react-icons/fa6"; + +const Socials: React.FC = () => { + const socialPlatforms = [ + { name: "github", url: "https://github.com/krvvs", icon: }, + { name: "twitter", url: "https://x.com/xkrvsx", icon: }, + ]; + + return ( +
+ {socialPlatforms.map(social => ( + + {social.icon} + + ))} +
+ ); +}; + +export default Socials; diff --git a/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx new file mode 100644 index 0000000..b4efee2 --- /dev/null +++ b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx @@ -0,0 +1,63 @@ +"use client"; + +import { useEffect, useState } from "react"; +import Image from "next/image"; +import Socials from "./components/Socials"; +import type { NextPage } from "next"; +import { useEnsAvatar, useEnsName } from "wagmi"; +import { Address } from "~~/components/scaffold-eth"; + +const builderAddress = "0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8"; + +const KrvvsProfile: NextPage = () => { + const [ensAvatar, setEnsAvatar] = useState(); + + const { data: fetchedEns } = useEnsName({ + address: builderAddress, + chainId: 1, + }); + + const { data: fetchedEnsAvatar } = useEnsAvatar({ + name: fetchedEns ? fetchedEns : "", + chainId: 1, + }); + + useEffect(() => { + setEnsAvatar(fetchedEnsAvatar); + }, [fetchedEnsAvatar]); + + return ( +
+
+
+
+ Builder's Avatar +
+
+
+
{fetchedEns}
+ +
+ +
+

Hello World!

+

+ I am a builder who enjoys learning and creating value, with a strong interest in bringing blockchain + technologies to life. +

+
+
+
+
+
+
+ ); +}; + +export default KrvvsProfile; diff --git a/packages/nextjs/next.config.js b/packages/nextjs/next.config.js index d765869..52b5b18 100644 --- a/packages/nextjs/next.config.js +++ b/packages/nextjs/next.config.js @@ -14,6 +14,16 @@ const nextConfig = { config.externals.push("pino-pretty", "lokijs", "encoding"); return config; }, + images: { + remotePatterns: [ + { + protocol: "https", + hostname: "avatars.githubusercontent.com", + port: "", + pathname: "/u/**", + }, + ], + }, }; module.exports = nextConfig; From 9cf707266bb40e95da66bf5e5d20e099855982af Mon Sep 17 00:00:00 2001 From: Superior Date: Thu, 24 Oct 2024 08:38:18 +0100 Subject: [PATCH 11/14] update builder address --- .../page.tsx | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/nextjs/app/builders/{0x62CeF3Ca8b52a9C69a17236CA2c56Cdb7a383E8e => 0x549dd44DEA0127254dA32b0C4e79ae3D2CB8b94d}/page.tsx (100%) diff --git a/packages/nextjs/app/builders/0x62CeF3Ca8b52a9C69a17236CA2c56Cdb7a383E8e/page.tsx b/packages/nextjs/app/builders/0x549dd44DEA0127254dA32b0C4e79ae3D2CB8b94d/page.tsx similarity index 100% rename from packages/nextjs/app/builders/0x62CeF3Ca8b52a9C69a17236CA2c56Cdb7a383E8e/page.tsx rename to packages/nextjs/app/builders/0x549dd44DEA0127254dA32b0C4e79ae3D2CB8b94d/page.tsx From a8cdcdeb6947371189e05213c76e415cb053b295 Mon Sep 17 00:00:00 2001 From: krvvs <141290516+krvvs@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:04:44 +0900 Subject: [PATCH 12/14] Refactored hooks and props --- .../page.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx index b4efee2..8eea6c9 100644 --- a/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx +++ b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx @@ -1,6 +1,5 @@ "use client"; -import { useEffect, useState } from "react"; import Image from "next/image"; import Socials from "./components/Socials"; import type { NextPage } from "next"; @@ -10,8 +9,6 @@ import { Address } from "~~/components/scaffold-eth"; const builderAddress = "0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8"; const KrvvsProfile: NextPage = () => { - const [ensAvatar, setEnsAvatar] = useState(); - const { data: fetchedEns } = useEnsName({ address: builderAddress, chainId: 1, @@ -22,21 +19,16 @@ const KrvvsProfile: NextPage = () => { chainId: 1, }); - useEffect(() => { - setEnsAvatar(fetchedEnsAvatar); - }, [fetchedEnsAvatar]); - return (
Builder's Avatar
From 2a04326a17edf4593fc6d285806a84e488690c61 Mon Sep 17 00:00:00 2001 From: krvvs <141290516+krvvs@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:06:46 +0900 Subject: [PATCH 13/14] feat: Added placeholder for ENS --- .../0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx index 8eea6c9..fa44b7c 100644 --- a/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx +++ b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx @@ -7,6 +7,7 @@ import { useEnsAvatar, useEnsName } from "wagmi"; import { Address } from "~~/components/scaffold-eth"; const builderAddress = "0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8"; +const shortBuilderAddress = builderAddress.slice(0, 6); const KrvvsProfile: NextPage = () => { const { data: fetchedEns } = useEnsName({ @@ -33,7 +34,7 @@ const KrvvsProfile: NextPage = () => {
-
{fetchedEns}
+
{fetchedEns || shortBuilderAddress}
From f04c4fc5698f55dc938ef1ac4c4b148613320bd9 Mon Sep 17 00:00:00 2001 From: krvvs <141290516+krvvs@users.noreply.github.com> Date: Fri, 25 Oct 2024 00:00:13 +0900 Subject: [PATCH 14/14] fix: Display ENS Avatar without error --- .../0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx index fa44b7c..c9643b3 100644 --- a/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx +++ b/packages/nextjs/app/builders/0xe9Ad7D1C2069E0Fa9b5852Adc77C9196651BB8b8/page.tsx @@ -1,6 +1,5 @@ "use client"; -import Image from "next/image"; import Socials from "./components/Socials"; import type { NextPage } from "next"; import { useEnsAvatar, useEnsName } from "wagmi"; @@ -25,11 +24,10 @@ const KrvvsProfile: NextPage = () => {
- Builder's Avatar