15 lines
365 B
TypeScript
15 lines
365 B
TypeScript
import { getAccountInfo } from '@api';
|
|
import { createAsyncThunk } from '@reduxjs/toolkit';
|
|
|
|
export const getAccountInfoThunk = createAsyncThunk(
|
|
'account/getAccountInfo',
|
|
async (_, { rejectWithValue }) => {
|
|
try {
|
|
const response = await getAccountInfo();
|
|
return response;
|
|
} catch (error) {
|
|
return rejectWithValue(error);
|
|
}
|
|
},
|
|
);
|