Merge remote-tracking branch 'upstream/dev' into fix/drive-connector

This commit is contained in:
Anish Sarkar 2026-01-28 02:34:30 +05:30
commit 8a5f6ecce1
16 changed files with 171 additions and 218 deletions

View file

@ -2,29 +2,18 @@ import { atom } from "jotai";
interface GlobalLoadingState {
isLoading: boolean;
message?: string;
variant: "login" | "default";
}
export const globalLoadingAtom = atom<GlobalLoadingState>({
isLoading: false,
message: undefined,
variant: "default",
});
// Helper atom for showing global loading
export const showGlobalLoadingAtom = atom(
null,
(
get,
set,
{ message, variant = "default" }: { message?: string; variant?: "login" | "default" }
) => {
set(globalLoadingAtom, { isLoading: true, message, variant });
}
);
export const showGlobalLoadingAtom = atom(null, (get, set) => {
set(globalLoadingAtom, { isLoading: true });
});
// Helper atom for hiding global loading
export const hideGlobalLoadingAtom = atom(null, (get, set) => {
set(globalLoadingAtom, { isLoading: false, message: undefined, variant: "default" });
set(globalLoadingAtom, { isLoading: false });
});