all repos — caroster @ 7aaf2e08839a69d11fe38936bef5abaf5789b853

[Octree] Group carpool to your event https://caroster.io

frontend/stores/useToastStore.ts (view raw)

 1import create from 'zustand';
 2
 3type State = {
 4  toast?: string;
 5  addToast: (message: string) => void;
 6  clearToast: () => void;
 7};
 8
 9const useToastStore = create<State>(set => ({
10  toast: null,
11  addToast: toast => set({toast}),
12  clearToast: () => set({toast: null}),
13}));
14
15export default useToastStore;