Skip to content
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

Merged
merged 5 commits into from
Sep 28, 2021
Merged

Conversation

juyoungkim304
Copy link
Contributor

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.

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> => {
Copy link

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
Copy link

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
Copy link

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
Copy link

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.

@codeclimate
Copy link

codeclimate bot commented Sep 26, 2021

Code Climate has analyzed commit f7ff9ef and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

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.

Copy link
Contributor

@SamLee514 SamLee514 left a comment

Choose a reason for hiding this comment

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

Approve

@SamLee514 SamLee514 merged commit cd265b7 into main Sep 28, 2021
@SamLee514 SamLee514 deleted the feat/organizerDashboardMain branch September 28, 2021 20:50
@github-actions github-actions bot added the approved Automatically added, do not manually add label Sep 28, 2021
SamLee514 pushed a commit that referenced this pull request Sep 28, 2021
* 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>
SamLee514 pushed a commit that referenced this pull request Sep 28, 2021
* 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>
SamLee514 pushed a commit that referenced this pull request Sep 28, 2021
* 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>
SamLee514 pushed a commit that referenced this pull request Sep 29, 2021
* 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>
SamLee514 pushed a commit that referenced this pull request Sep 30, 2021
* 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>
SamLee514 pushed a commit that referenced this pull request Oct 4, 2021
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Automatically added, do not manually add
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants