This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[C-918] Move trending saga to common (#1814)
- Loading branch information
1 parent
6f24724
commit c854f66
Showing
7 changed files
with
27 additions
and
16 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
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,40 +1,42 @@ | ||
// @ts-nocheck | ||
// TODO(nkang) - convert to TS | ||
import { ID, SmartCollectionVariant, UID } from '../../../models' | ||
|
||
export const FETCH_COLLECTION = 'FETCH_COLLECTION' | ||
export const FETCH_COLLECTION_SUCCEEDED = 'FETCH_COLLECTION_SUCCEEDED' | ||
export const FETCH_COLLECTION_FAILED = 'FETCH_COLLECTION_FAILED' | ||
export const RESET_COLLECTION = 'RESET_COLLECTION' | ||
export const SET_SMART_COLLECTION = 'SET_SMART_COLLECTION' | ||
|
||
export const fetchCollection = (handle, id) => ({ | ||
export const fetchCollection = (handle: string | null, id: number) => ({ | ||
type: FETCH_COLLECTION, | ||
handle, | ||
id | ||
}) | ||
|
||
export const fetchCollectionSucceeded = ( | ||
collectionId, | ||
collectionUid, | ||
userUid | ||
collectionId: ID, | ||
collectionUid: string, | ||
userUid: string | ||
) => ({ | ||
type: FETCH_COLLECTION_SUCCEEDED, | ||
collectionId, | ||
collectionUid, | ||
userUid | ||
}) | ||
|
||
export const fetchCollectionFailed = (userUid) => ({ | ||
export const fetchCollectionFailed = (userUid: UID) => ({ | ||
type: FETCH_COLLECTION_FAILED, | ||
userUid | ||
}) | ||
|
||
export const resetCollection = (collectionUid, userUid) => ({ | ||
export const resetCollection = (collectionUid: UID, userUid: UID) => ({ | ||
type: RESET_COLLECTION, | ||
collectionUid, | ||
userUid | ||
}) | ||
|
||
export const setSmartCollection = (smartCollectionVariant) => ({ | ||
export const setSmartCollection = ( | ||
smartCollectionVariant: SmartCollectionVariant | ||
) => ({ | ||
type: SET_SMART_COLLECTION, | ||
smartCollectionVariant | ||
}) |
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
2 changes: 1 addition & 1 deletion
2
...eb/src/pages/trending-page/store/sagas.js → .../src/common/store/pages/trending/sagas.js
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