Skip to content

Conversation

@JeffKko
Copy link
Contributor

@JeffKko JeffKko commented Dec 15, 2021

No description provided.

@@ -1,7 +1,12 @@
import { TransitionLeaderboardWrapper } from './TransitionLeaderboardWrapper';
import { VirtualizedList } from './VirtualizedList';
import ScratchOffCard from './ScratchOffCard';
Copy link
Contributor

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';
這種方式引入,變得要宣告絕對路徑吧?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

return <Wrapper>{renderChild()}</Wrapper>;
},
);
};

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 ··

Suggested change
};
};

};

export const TransitionLeaderboardWrapper: React.FC<Props> = React.memo(
export const TransitionLeaderboardWrapper: React.FC<TransitionLeaderboardWrapperProps> =

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:

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> = ({

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:

Suggested 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants