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(explorer): various fixes #3299

Merged
merged 15 commits into from
Oct 17, 2024
Merged

fix(explorer): various fixes #3299

merged 15 commits into from
Oct 17, 2024

Conversation

karooolis
Copy link
Contributor

@karooolis karooolis commented Oct 16, 2024

  • Not found page if invalid chain name
  • Only show selector for worlds if options exist
  • Remove "future time" from transactions table
  • Improved layout for Interact tab
  • Wrap long inputs
  • Add back logs (regression)
  • Tables query refetching

Copy link

changeset-bot bot commented Oct 16, 2024

🦋 Changeset detected

Latest commit: d9075cc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
@latticexyz/explorer Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/cli Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/dev-tools Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/protocol-parser Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/stash Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/store Patch
@latticexyz/utils Patch
@latticexyz/world-module-metadata Patch
@latticexyz/world-modules Patch
@latticexyz/world Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

export default async function ChainPage({ params }: Props) {
return redirect(`/${params.chainName}/worlds`);
export default async function ChainPage({ params: { chainName } }: Props) {
return redirect(`/${chainName}/worlds`);
Copy link
Member

@holic holic Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thoughts on validating the chain name here and only redirect when valid?

this is what causes the /favicon.ico/worlds 404 error

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since chain names are known statically, I wonder if its helpful to use getStaticPaths on these routes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getStaticPaths only works with pages router while we are using app router which is the recommended way now and moving forward.

There is something similar in the app router called generateStaticParams which I think we can use the same way. However, I don't think we should make this page static given that the world addresses which we display in world entry page are dynamic.

Now getServerSideProps inside app router is essentially replaced with async server-side component with a fetcher function inside. So based on that, the validation also is moved to the component itself. What I think would be best to do here is to actually move the validation inside layout.tsx. I already did that for (explorer)/[chainName]/worlds/[worldAddress]/layout.tsx but actually thinking that same could be done for (explorer)/[chainName]/layout.tsx(which doesn't exist yet but could be created for the purpose of validation). This way there's less repeating logic at least.

@karooolis karooolis merged commit 9a43e87 into main Oct 17, 2024
13 checks passed
@karooolis karooolis deleted the kumpis/fixes-cleanups branch October 17, 2024 18:43
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.

2 participants