@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
9 lines (7 loc) • 321 B
text/typescript
import { pushToCache } from '~/cache/api';
import { STORY_KEY_CACHE } from '~/storyRepository/constants';
export const mappingStoryIdToReferenceId = (stories: Amity.InternalStory[]) => {
stories.forEach(story => {
pushToCache([STORY_KEY_CACHE.STORY_ID_TO_REFERENCE_ID, story.storyId], story.referenceId);
});
};