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

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

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