12 lines
297 B
TypeScript
12 lines
297 B
TypeScript
import { type StateCreator } from 'zustand';
|
|
|
|
export type ServiceSlice = {
|
|
serviceId: null | string;
|
|
setServiceId: (id: null | string) => void;
|
|
};
|
|
|
|
export const createServiceSlice: StateCreator<ServiceSlice> = (set) => ({
|
|
serviceId: null,
|
|
setServiceId: (id) => set({ serviceId: id }),
|
|
});
|