Closed vivian0420 closed 6 months ago
Build is failing due to some issues like
i [Error]: Page with `dynamic = "error"` couldn't be rendered statically because it used `searchParams.season`.
at s (/github/workspace/.next/server/chunks/248.js:1:98315)
at Object.get (/github/workspace/.next/server/chunks/248.js:1:97442)
at m (/github/workspace/.next/server/app/basketball/[competition]/teams/page.js:1:[566](https://github.com/svcsa-dev/svcsa-react/actions/runs/8806973560/job/24172961171#step:4:567)2) {
code: 'NEXT_STATIC_GEN_BAILOUT'
}
This is due to some issue in the SSR mode. In the build time, the app will generate static pages, which is not working with search params.
I am not expert in this either, encourage you to try to figure out the Next.js doc to see if you can solve it
I have addressed the build errors and optimized the code according to the comments provided earlier. Please review the changes.
Pull Request
Added /teams router and TeamList Component
Description
Commit: code of teamlist:
Commit: refactored the TeamCard component from the TeamList component:
Commit: Fixed the team logo uploading issues:
Commit: Added key prop for each teamCard: