w-aura/src/components/ChatsPath/hooks/useUpdateStep.ts
Daniil Chemerkin f9d8a67176 Develop
2024-10-24 21:05:01 +00:00

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]);
};