You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
pizza.krasnikov.pro/.history/redux/pizza/stock_20220529141149.ts

12 lines
335 B

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;
},
);