You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mobile/store/exerciceStore.tsx

13 lines
378 B

import { ExerciceDTO } from "@/api/service/dto/dto.training";
import { create } from "zustand/react";
type State = {
selectedExercice: ExerciceDTO | null;
setExercice: (exercice: ExerciceDTO) => void;
};
export const useExerciceStore = create<State>((set) => ({
selectedExercice: null,
setExercice: (exercice: ExerciceDTO) => set({ selectedExercice: exercice }),
}));