hackportal icon indicating copy to clipboard operation
hackportal copied to clipboard

Migrate multiple UI dependencies and Next.js

Open doanhtu07 opened this issue 1 year ago • 1 comments

In this PR, ultimately, I want to upgrade Next.js to latest version.

Reason

The strongest benefit is that now we can work with the latest third-party libraries and are not afraid of outdated peer dependencies.

One example of this is using next/font instead next-fonts.

  • I figured out this since I was trying to use font for our new design, but next-fonts was a super old library already

MUI

I also fixed peer dependency issues with material-ui. Now our project should be able to use mui library completely and not mix between the old library and the new one.

  • A tricky thing with the old material-ui is that it only works with react version < 18, which is not ideal

    • Next.js from v13 has dependencies on react v18 already
  • NOTE: We will not have makeStyles or similar utilities anymore, since they are deprecated in new mui library.

    • Alternative for this is either using Tailwind directly or sx props or styled() supported by new mui
    • We can also check out package tss-react which an alternative for makeStyles and not have issue with react v18

doanhtu07 avatar Apr 10 '24 22:04 doanhtu07

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hackportal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2024 5:51am

vercel[bot] avatar Apr 10 '24 22:04 vercel[bot]

@DedsecKnight I've merged your PR #266 into mine as your PR looks fine to me. It only updates Firebase dependencies, so there should be no problem. I also tested running the code locally, and everything ran fine.

doanhtu07 avatar Jun 18 '24 03:06 doanhtu07