// ✅ Thunk: /redux/thunks/fetchKueDataThunk.ts

import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchKueDataService } from "../../services/fetchKueDataService";
import { setKueData } from "../slices/kueDataSlice";

export const fetchKueDataThunk = createAsyncThunk(
  "kueData/fetch",
  async (_, { dispatch }) => {
    const data = await fetchKueDataService();
    if (data) {
      dispatch(setKueData(data));
    }
  }
);
