import { createAsyncThunk } from "@reduxjs/toolkit";
import { getHomeMenu } from "../../api/homeApi";

export const fetchHomeMenu = createAsyncThunk(
  "menu/fetchHomeMenu",
  async (_, { rejectWithValue }) => {
    try {
      const response = await getHomeMenu();

      return response.data;
    } catch (error) {
      return rejectWithValue("unkown Error");
    }
  }
);
