Skip to content
Snippets Groups Projects
Commit 62df5565 authored by Tadeusz Miesiąc's avatar Tadeusz Miesiąc
Browse files

refactor(fetch data state type): moved fetching state to abstraction cuz it's repeated few times

parent 39d79916
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!20Resolve MIN-57 "Feature/ connect drug search query"
Pipeline #79154 failed
import { Loading } from '@/types/loadingState';
import { FetchDataState } from '@/types/fetchDataState';
import { Drug } from '@/types/models';
export type DrugsState = {
data: Drug[] | undefined;
loading: Loading;
error: Error;
};
export type DrugsState = FetchDataState<Drug[]>;
import { Loading } from './loadingState';
export type FetchDataState<T> = {
data: T | undefined;
loading: Loading;
error: Error;
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment