@esvndev/es-react-template-chat 0.0.42 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -26219,17 +26219,6 @@ const encodeUUID = (uuid) => {
26219
26219
  }
26220
26220
  };
26221
26221
 
26222
- const getToken = () => {
26223
- let accessToken = localStorage.getItem('access_token');
26224
- if (!accessToken) {
26225
- const userData = localStorage.getItem('userData');
26226
- if (userData && userData.length) {
26227
- accessToken = JSON.parse(userData).id_token;
26228
- }
26229
- }
26230
- return accessToken;
26231
- };
26232
-
26233
26222
  // ** Redux Imports
26234
26223
  // Convert 1 bản ghi PinMessage từ backend thành object message dùng cho UI ghim
26235
26224
  const mapPinRecordToMessage = (record) => {
@@ -26292,13 +26281,6 @@ const get_history = createAsyncThunk(CHAT.ACTION_TYPES.GET_HISTORY, async (param
26292
26281
  return thunkAPI.rejectWithValue({ error: error.message });
26293
26282
  }
26294
26283
  });
26295
- // export const get_history = createAsyncThunk<any, any>(CHAT.ACTION_TYPES.GET_HISTORY, async (params, thunkAPI) => {
26296
- // try {
26297
- // return await api.chatApi.getHistory(params)
26298
- // } catch (error: any) {
26299
- // return thunkAPI.rejectWithValue({ error: error.response.data })
26300
- // }
26301
- // })
26302
26284
  // export const get_message_by_group_cursor = createAsyncThunk<any, any>(CHAT.ACTION_TYPES.GET_MESSAGE_BY_GROUP_CURSOR, async (params, thunkAPI) => {
26303
26285
  // try {
26304
26286
  // return await api.chatApi.getMessageByGroupCursor(params.chatRoomId, params)
@@ -26770,7 +26752,6 @@ const appChatSlice = createSlice({
26770
26752
  }
26771
26753
  },
26772
26754
  extraReducers: builder => {
26773
- console.log('extraReducers', builder);
26774
26755
  // builder.addCase(contact_add.fulfilled, (state: IFState) => {
26775
26756
  // state.checkInit = !state.checkInit
26776
26757
  // })
@@ -26801,9 +26782,9 @@ const appChatSlice = createSlice({
26801
26782
  // builder.addCase(update_chat_room_member.fulfilled, (state: IFState) => {
26802
26783
  // state.checkInit = !state.checkInit
26803
26784
  // })
26804
- builder.addCase(get_history.fulfilled, (state, action) => {
26805
- state.listHistory = action.payload?.items;
26806
- });
26785
+ // builder.addCase(get_history.fulfilled, (state: IFState, action) => {
26786
+ // state.listHistory = action.payload?.items
26787
+ // })
26807
26788
  // builder.addCase(getPinMessageChatRoomApi.fulfilled, (state: IFState, action) => {
26808
26789
  // // Backend trả về danh sách PinMessage (mảng / items / data)
26809
26790
  // const payload = action.payload as any