index.ts 589 B

12345678910111213141516171819202122
  1. import { createAction } from '@reduxjs/toolkit';
  2. import { IChatsRes } from '../../../typescript/redux/chats/interfaces'
  3. import { TChat } from '../../../typescript/redux/chats/types'
  4. const actionGetChatsSuccess = createAction('getChats/success', (value:IChatsRes) => ({
  5. payload: value,
  6. }));
  7. const actionGetChatsReject = createAction('getChats/reject', () => ({
  8. payload: null,
  9. }));
  10. const selectCompanionSuccess = createAction('selectCompanion/success', (value:TChat) => ({
  11. payload: value,
  12. }));
  13. export {
  14. actionGetChatsSuccess,
  15. actionGetChatsReject,
  16. selectCompanionSuccess
  17. };