-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Retrieve base wearables from the catalyst (#1706)
* fix: Retrieve base wearables from the catalyst * fix: Change the Preview's variable name * fix: Remove unused imports * fix: Internationalize the loading screen * fix: Remove male and female harcoded values * chore: Add actions, reducers, selectors and utils tests * fix: calls * fix: Use effect on fetch call
- Loading branch information
1 parent
6561087
commit 0a33d7a
Showing
30 changed files
with
868 additions
and
4,828 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...nts/ItemEditorPage/CenterPanel/AvatarWearableDropdown/AvatarWearableDropdown.container.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { connect } from 'react-redux' | ||
import { RootState } from 'modules/common/types' | ||
import { getBaseWearables } from 'modules/editor/selectors' | ||
import { MapStateProps } from './AvatarWearableDropdown.types' | ||
import AvatarWearableDropdown from './AvatarWearableDropdown' | ||
|
||
const mapState = (state: RootState): MapStateProps => { | ||
return { | ||
baseWearables: getBaseWearables(state) | ||
} | ||
} | ||
|
||
export default connect(mapState)(AvatarWearableDropdown) |
13 changes: 6 additions & 7 deletions
13
src/components/ItemEditorPage/CenterPanel/AvatarWearableDropdown/AvatarWearableDropdown.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/ItemEditorPage/CenterPanel/AvatarWearableDropdown/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import AvatarWearableDropdown from './AvatarWearableDropdown' | ||
import AvatarWearableDropdown from './AvatarWearableDropdown.container' | ||
export default AvatarWearableDropdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { wearable } from 'specs/editor' | ||
import { | ||
fetchBaseWearablesFailure, | ||
fetchBaseWearablesRequest, | ||
fetchBaseWearablesSuccess, | ||
FETCH_BASE_WEARABLES_FAILURE, | ||
FETCH_BASE_WEARABLES_REQUEST, | ||
FETCH_BASE_WEARABLES_SUCCESS | ||
} from './actions' | ||
|
||
const commonError = 'anError' | ||
|
||
describe('when creating the action that signals the start of a base wearables fetch request', () => { | ||
it('should return an action signaling the start of the base wearables fetch', () => { | ||
expect(fetchBaseWearablesRequest()).toEqual({ type: FETCH_BASE_WEARABLES_REQUEST }) | ||
}) | ||
}) | ||
|
||
describe('when creating the action that signals the successful fetch of tiers', () => { | ||
it('should return an action signaling the success of the base wearables fetch', () => { | ||
expect(fetchBaseWearablesSuccess([wearable])).toEqual({ | ||
type: FETCH_BASE_WEARABLES_SUCCESS, | ||
payload: { wearables: [wearable] } | ||
}) | ||
}) | ||
}) | ||
|
||
describe('when creating the action that signals the unsuccessful fetch of tiers', () => { | ||
it('should return an action signaling the failure of the base wearables fetch', () => { | ||
expect(fetchBaseWearablesFailure(commonError)).toEqual({ | ||
type: FETCH_BASE_WEARABLES_FAILURE, | ||
payload: { error: commonError } | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
0a33d7a
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.
Successfully deployed to the following URLs: