import { getCustomerDetails } from '@api'; import { CustomerResponse } from '@interfaces'; import { createAsyncThunk } from '@reduxjs/toolkit'; export const fetchCustomerDetails = createAsyncThunk( 'customer/fetchCustomerDetails', async (_, { rejectWithValue }) => { try { const response = await getCustomerDetails(); console.log(response); return response; } catch (error: any) { console.log(error); return rejectWithValue(error?.message); } }, );