import { createAsyncThunk } from '@reduxjs/toolkit';
import axios from 'axios';
import { PizzaToCard } from './types';

export const fetchPizzaToCard = createAsyncThunk(
    'pizza/fetchPizzaStatus',
    async () => {
      const { data } = await axios.get<PizzaToCard[]>(`/api/loadingPizzaInformation/`);
      console.log(data);
      return data;
    },
  );