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

Upgrade frontend to Next.js 13.x #319

Merged
merged 14 commits into from
Mar 10, 2023
Merged

Upgrade frontend to Next.js 13.x #319

merged 14 commits into from
Mar 10, 2023

Conversation

ferostabio
Copy link
Contributor

I always noticed that we have a FOUT issue (that the default font appears for a bit before switching to our font), so the whole screen changes size. Known issue.

Didn't want to spend much time on it, but I saw that in next 13.x they added a new submodule to preload fonts that work particularly well with Google Fonts, as the one we're using.

I quickly upgraded to 13, solved a few problems, and changed the way we load fonts. There's no FOUT anymore, and it seems everything looks good. Again, I spent only a couple of minutes trying this, so it could be just a starting point, but the impact is significant!

@brozorec care to have a look?

@brozorec
Copy link
Contributor

hey @ferostar ok for me 👍
Would you also update "package.json" with the new version of next and also add @next/font (CI fails because it doesn't find this module)?

@github-actions
Copy link

Please test this PR on: https://v2-staging-319-dot-fuji-306908.ey.r.appspot.com

@ferostabio ferostabio changed the title Font loading Upgrade frontend to Next.js 13.x Feb 24, 2023
@ferostabio ferostabio marked this pull request as ready for review February 24, 2023 14:04
@ferostabio
Copy link
Contributor Author

@brozorec just realized something went missing in the UI after upgrading, I'll let you know once I'm done

@ferostabio ferostabio marked this pull request as draft February 24, 2023 15:37
@ferostabio
Copy link
Contributor Author

@brozorec turns out there's at least one issue between Next 13 and web3-onboard, going to see if I can quickly solve it. Otherwise, I'll leave until after the MVP.

@ferostabio
Copy link
Contributor Author

ferostabio commented Feb 24, 2023

Tried all solutions provided so far:

  • Upgraded node to 18.x
  • Upgraded web3-onboard
  • Wrapped the app in their provider

It doesn't work. Only setting swcMinify to false does. But by doing so we lose its performance improvements.

@ferostabio ferostabio marked this pull request as ready for review February 28, 2023 02:19
@brozorec brozorec merged commit a8d05a5 into main Mar 10, 2023
@brozorec brozorec deleted the frontend/feat/font-test branch March 10, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants