-
Notifications
You must be signed in to change notification settings - Fork 213
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
Revive go-next #1944
Revive go-next #1944
Conversation
[sr-frontend] [Fri Apr 12 00:31:44 UTC 2024] - Deployed acdb230 to https://genshin-optimizer-prs.github.io/pr/1944/sr-frontend (Takes 3-5 minutes after this completes to be available) [frontend] [Fri Apr 12 00:32:47 UTC 2024] - Deployed acdb230 to https://genshin-optimizer-prs.github.io/pr/1944/frontend (Takes 3-5 minutes after this completes to be available) [Fri Apr 12 04:04:21 UTC 2024] - Deleted deployment |
@@ -312,7 +312,7 @@ function Header({ | |||
<ColorText color={mainStatLevel !== level ? 'warning' : undefined}> | |||
{getMainStatDisplayStr( | |||
mainStatKey, | |||
rarity as RarityKey, | |||
rarity as ArtifactRarity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have to type assert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Artifact.rarity is a Int (number) from GraphQL interface, ArtifactRarity
is 3|4|5
https://github.com/frzyc/genshin-optimizer/blob/master/apps/gi-backend/src/app/schema_gen.graphql#L33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i thought the benefit of this was it had type safety
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getting the type for rarity to be a more strict enum is just extra work that hasnt been done yet, it will still validate it to be a int, which is better than any
Describe your changes
Get go-next to a working state again.
Add
@prisma/nextjs-monorepo-workaround-plugin
to resolve multiple instance of Prisma Client due to hot refresh in NextJS.Issue or discord link
Testing/validation
Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)
yarn run mini-ci
locally to validate format and lint.