-
Notifications
You must be signed in to change notification settings - Fork 12
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
Recreating organizer dashboard pr #850
Conversation
const KVData = (data: { [key: string]: number }): ChartData<ChartJSData> => { | ||
const keys = Object.keys(data).slice(0, -1); | ||
const values = Object.values(data).slice(0, -1); | ||
const KVData = (hackerData: string[], types: string): ChartData<ChartJSData> => { |
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.
Function KVData
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
@@ -218,17 +196,35 @@ export const OrganizerDash: FC<Props> = ({ disableAnimations }): JSX.Element => | |||
<StyledFloatingPopupTop marginBottom="1rem" backgroundOpacity="1" padding="1.5rem"> | |||
<UpperChartLayout> | |||
<BarChartLayout> | |||
<Bar data={KVData(data.getAllHackerStatuses)} options={statusOptions} /> | |||
<Bar |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
Manage hackers | ||
</Button> | ||
</StyledFloatingPopupTop> | ||
<StyledFloatingPopupBottom backgroundOpacity="1" padding="1.5rem"> | ||
<Pie data={KVData(data.getAllHackerSizes)} options={shirtOptions} /> | ||
<Pie data={KVData(data.getAllHackerGenders)} options={genderOptions} /> | ||
<Pie |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
)} | ||
options={shirtOptions} | ||
/> | ||
<Pie |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
Code Climate has analyzed commit f7ff9ef and detected 1 issue on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 21.0% (0% is the threshold). This pull request will bring the total coverage in the repository to 62.9% (-0.3% change). View more on Code Climate. |
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.
Approve
* Recreating organizer dashboard pr * removing unnessary imports * attendingInPerson hasn't been merged into main yet * fix some compilation errors * correct organizer dashboard route Co-authored-by: Samuel Lee <samlee514@Samuels-MacBook-Pro-2.local>
* Recreating organizer dashboard pr * removing unnessary imports * attendingInPerson hasn't been merged into main yet * fix some compilation errors * correct organizer dashboard route Co-authored-by: Samuel Lee <samlee514@Samuels-MacBook-Pro-2.local>
* Recreating organizer dashboard pr * removing unnessary imports * attendingInPerson hasn't been merged into main yet * fix some compilation errors * correct organizer dashboard route Co-authored-by: Samuel Lee <samlee514@Samuels-MacBook-Pro-2.local>
* Recreating organizer dashboard pr * removing unnessary imports * attendingInPerson hasn't been merged into main yet * fix some compilation errors * correct organizer dashboard route Co-authored-by: Samuel Lee <samlee514@Samuels-MacBook-Pro-2.local>
* Recreating organizer dashboard pr * removing unnessary imports * attendingInPerson hasn't been merged into main yet * fix some compilation errors * correct organizer dashboard route Co-authored-by: Samuel Lee <samlee514@Samuels-MacBook-Pro-2.local>
* Recreating organizer dashboard pr * removing unnessary imports * attendingInPerson hasn't been merged into main yet * fix some compilation errors * correct organizer dashboard route Co-authored-by: Samuel Lee <samlee514@Samuels-MacBook-Pro-2.local>
Summary
The organizer dash no longer throws an error. Instead, useful charts about cumulative t-shirt sizes, application status, and gender are shown.
Review Focus
Anything you want the reviewer to pay attention to? Feel free to delete this section.