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

fix(badge): handle new grand_slam badge #698

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/components/BadgedUser/DigestList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react'
import { Table } from 'antd'
import _get from 'lodash/get'
import _compact from 'lodash/compact'
import { Tag } from 'antd'

Expand Down
1 change: 1 addition & 0 deletions src/components/BadgedUser/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export const USER_BADGES: {
nomad2: { text: '流星號', color: '#066320' },
nomad3: { text: '光輪號', color: '#5b0707' },
nomad4: { text: '火閃電', color: '#bf9604' },
grand_slam: { text: '大滿貫', color: '#ffA500' },
}
3 changes: 1 addition & 2 deletions src/definitions/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {
GQLUserRestrictionType,
GQLCampaignState,
GQLDatetimeRange,
GQLCampaignStage,
GQLCampaignApplicationState,
GQLCampaignApplication,
} from './schema'

Expand All @@ -30,6 +28,7 @@ export type USER_BADGE_TYPES =
| 'nomad2'
| 'nomad3'
| 'nomad4'
| 'grand_slam'

export type UserDigest = {
id: string
Expand Down
7 changes: 1 addition & 6 deletions src/pages/BadgedUserList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import _get from 'lodash/get'

import ErrorMessage from '../../components/ErrorMessage'
import BadgedUserDigestList from '../../components/BadgedUser/DigestList'
Expand All @@ -8,7 +7,7 @@ import withBadgedUserList, { BadgedUsersChildProps } from './withBadgedUserList'
import { UserDigest } from '../../definitions'

class BadgedUserList extends React.Component<BadgedUsersChildProps> {
private _renderContent() {
public render() {
const {
data: { oss, loading, error, fetchMore, variables },
} = this.props
Expand All @@ -32,10 +31,6 @@ class BadgedUserList extends React.Component<BadgedUsersChildProps> {
/>
)
}

public render() {
return <>{this._renderContent()}</>
}
}

export default withBadgedUserList(BadgedUserList)
2 changes: 1 addition & 1 deletion src/pages/BadgedUserList/withBadgedUserList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { graphql, ChildDataProps, compose } from 'react-apollo'
import { graphql, ChildDataProps } from 'react-apollo'
import { RouteComponentProps } from 'react-router-dom'

import { PAGE_SIZE } from '../../constants'
Expand Down
Loading