feat: notify on invalid robot

This commit is contained in:
karishmas6
2024-10-24 03:50:46 +05:30
parent 3fd333f5da
commit f5763ebd25

View File

@@ -57,7 +57,7 @@ interface RobotSettingsProps {
export const RobotSettingsModal = ({ isOpen, handleStart, handleClose, initialSettings }: RobotSettingsProps) => {
const [robot, setRobot] = useState<RobotSettings | null>(null);
const { recordingId } = useGlobalInfoStore();
const { recordingId, notify } = useGlobalInfoStore();
useEffect(() => {
if (isOpen) {
@@ -70,7 +70,7 @@ export const RobotSettingsModal = ({ isOpen, handleStart, handleClose, initialSe
const robot = await getStoredRecording(recordingId);
setRobot(robot);
} else {
console.log(`Could not find robot`)
notify('error', 'Could not find robot details. Please try again.');
}
}