UNPKG

@amityco/ts-sdk-react-native

Version:

Amity Social Cloud Typescript SDK

15 lines (13 loc) 411 B
import { pushToCache } from '~/cache/api'; import { shallowClone } from '~/utils/shallowClone'; export function updateSubChannelCache( subChannelId: string, subChannel: Amity.SubChannel | Record<string, never>, params: Partial<Amity.SubChannel>, ) { pushToCache( ['subChannel', 'get', subChannelId], // eslint-disable-next-line prefer-object-spread shallowClone(subChannel, params), ); }