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

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