all repos — caroster @ c7aa8445d4799c59a354b7cbb1a74c0a8f28381d

[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;