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

export const fetchLogin = createAsyncThunk(
    'stoke/fetchStokeStatus',
    async () => {
      const { data } = await axios.get<Token[]>(`/api/login`);
      return data;
    },
  );