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/workoutStore.tsx

13 lines
365 B

import { SessionDTO } from "@/api/service/dto/dto.training";
import { create } from "zustand/react";
type State = {
selectedWorkout: SessionDTO | null;
setWorkout: (workout: SessionDTO) => void;
};
export const useWorkoutStore = create<State>((set) => ({
selectedWorkout: null,
setWorkout: (workout: SessionDTO) => set({ selectedWorkout: workout }),
}));