-
Notifications
You must be signed in to change notification settings - Fork 0
[scratch-off] fix error #55
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
base: master
Are you sure you want to change the base?
Conversation
| @@ -1,7 +1,12 @@ | |||
| import { TransitionLeaderboardWrapper } from './TransitionLeaderboardWrapper'; | |||
| import { VirtualizedList } from './VirtualizedList'; | |||
| import ScratchOffCard from './ScratchOffCard'; | |||
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.
這邊這樣寫的話,vmo-frontend應該沒辦用
import { ScratchOffCard } from 'vmo-lib';
這種方式引入,變得要宣告絕對路徑吧?
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.
|
Kudos, SonarCloud Quality Gate passed!
|
| return <Wrapper>{renderChild()}</Wrapper>; | ||
| }, | ||
| ); | ||
| }; |
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.
Codacy has a fix for the issue: Delete ··
| }; | |
| }; |
| }; | ||
|
|
||
| export const TransitionLeaderboardWrapper: React.FC<Props> = React.memo( | ||
| export const TransitionLeaderboardWrapper: React.FC<TransitionLeaderboardWrapperProps> = |
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.
ℹ️ Codacy found a minor Code Style issue: Replace TransitionLeaderboardWrapperProps>·=⏎· with ⏎··TransitionLeaderboardWrapperProps⏎>·=
The issue reported by the ESLint linter is related to the formatting of the TypeScript code, specifically regarding the placement of the type annotation for the TransitionLeaderboardWrapper component. The linter suggests that the type should be placed on a new line to improve readability and adhere to the code style guidelines.
To fix the issue, you should move the type annotation TransitionLeaderboardWrapperProps to a new line before the assignment operator =.
Here’s the suggested change:
| export const TransitionLeaderboardWrapper: React.FC<TransitionLeaderboardWrapperProps> = | |
| export const TransitionLeaderboardWrapper: React.FC<TransitionLeaderboardWrapperProps> = |
This should be changed to:
export const TransitionLeaderboardWrapper: React.FC<TransitionLeaderboardWrapperProps>
=This comment was generated by an experimental AI tool.
| } | ||
|
|
||
| const ScratchOffCard: React.FC<Props> = ({ | ||
| export const ScratchOffCard: React.FC<ScratchOffCardProps> = ({ |
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.
ℹ️ Codacy found a minor Code Style issue: Function component is not a function declaration
The ESLint issue indicates that the linter prefers function declarations over function expressions for defining React components. This is a stylistic preference that can help with readability and consistency in codebases.
To resolve this issue, you can change the function component from a function expression to a function declaration. Here's the suggested code change:
| export const ScratchOffCard: React.FC<ScratchOffCardProps> = ({ | |
| export function ScratchOffCard({ revealPercentage = DEFAULT_REVEAL_PERCENTAGE, width, height, coverImgSrc, children, handleReveal }: ScratchOffCardProps) { |
This comment was generated by an experimental AI tool.








No description provided.