Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix broken blockexplorer address page #699

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Conversation

technophile-04
Copy link
Collaborator

Context :

This was introduced in #688 which we recently merged. We removed "use client" from components like AddressInput, EtherInput etc in #688 because there was lint warning in them as mentioned in #686.

Reason why #698 happened :

Screenshot 2024-01-23 at 8 03 18 PM

If you look at the error it occurred at blockexplorer/address/[address]/page.tsx and the cause of the error is AddressInput, but we are not using AddressInput anywhere instead we are using Address component which comes from ~~/components/scaffold-eth/index.ts barrel file and since this barrel file also exports inputs barrel we are indirectly importing AddressInput in address page (although we are not using it).

Solution :

I would suggest going through this comment discussion vercel/next.js#46795 (comment) once its really nice.

For now, I added a quick fix which is completely fine. An alternate solution is we can add "use client" to ~~/components/scaffold-eth/index.ts since all the SE-2 components are reactive and expected to be used on the client.

But yeah I think a future-proof solution might be removing barrel files at least from the components folder

@carletex
Copy link
Member

Thanks for this Shiv! Loved the discussion over the Vercel repo.

Let's merge this for now and we can think about a more «clean» solution at some point.

@carletex carletex merged commit 4cafb20 into main Jan 23, 2024
1 check passed
@carletex carletex deleted the fix-blockexplorer-address-page branch January 23, 2024 15:23
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants