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

export const fetchLogin = createAsyncThunk(
    'stoke/fetchStokeStatus',
    async () => {
      const { data } = await axios.get<Login[]>(`http://localhost:3000/api/loadingStock`);
      return data;
    },
  );