feat: set rerender true on duplicate
This commit is contained in:
@@ -56,7 +56,7 @@ interface RobotSettingsProps {
|
|||||||
export const RobotDuplicationModal = ({ isOpen, handleStart, handleClose, initialSettings }: RobotSettingsProps) => {
|
export const RobotDuplicationModal = ({ isOpen, handleStart, handleClose, initialSettings }: RobotSettingsProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [targetUrl, setTargetUrl] = useState<string | undefined>('');
|
const [targetUrl, setTargetUrl] = useState<string | undefined>('');
|
||||||
const { recordingId, notify, robot, setRobot } = useGlobalInfoStore();
|
const { recordingId, notify, robot, setRobot, setRerenderRobots } = useGlobalInfoStore();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
@@ -95,6 +95,8 @@ export const RobotDuplicationModal = ({ isOpen, handleStart, handleClose, initia
|
|||||||
const success = await duplicateRecording(robot.recording_meta.id, targetUrl);
|
const success = await duplicateRecording(robot.recording_meta.id, targetUrl);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
|
setRerenderRobots(true);
|
||||||
|
|
||||||
notify('success', t('robot_duplication.notifications.duplicate_success'));
|
notify('success', t('robot_duplication.notifications.duplicate_success'));
|
||||||
handleStart(robot);
|
handleStart(robot);
|
||||||
handleClose();
|
handleClose();
|
||||||
|
|||||||
Reference in New Issue
Block a user