12 lines
308 B
TypeScript
12 lines
308 B
TypeScript
import { actions } from "@/store";
|
|
import { useEffect } from "react";
|
|
import { useDispatch } from "react-redux";
|
|
|
|
|
|
export const useUpdateStep = (step: number) => {
|
|
const dispatch = useDispatch();
|
|
|
|
useEffect(() => {
|
|
dispatch(actions.chats.updateCurrentStep(step));
|
|
}, [dispatch, step]);
|
|
}; |