Add display loading state when updating item
This commit is contained in:
8 files changed
+231
-39
No files matched your search
@@ -0,0 +1,14 @@
|
||||
/** @format */
|
||||
|
||||
import { create } from "zustand";
|
||||
|
||||
export const useAppLoadingStore = create((set) => ({
|
||||
isLoading: false,
|
||||
isSuccess: false,
|
||||
isError: false,
|
||||
setIsLoading: (loading) =>
|
||||
set((state) => ({ ...state, isLoading: loading })),
|
||||
setIsSuccess: (success) =>
|
||||
set((state) => ({ ...state, isSuccess: success })),
|
||||
setIsError: (error) => set((state) => ({ ...state, isError: error })),
|
||||
}));
|
||||
Reference in new issue
Block a user