Skip to content

Commit bc350bc

Browse files
committed
Added alerts for form invalidation
1 parent bd09a74 commit bc350bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/components/ContextAPIManager/CreateTab/components/AddContextForm.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ const AddContextForm = ({
2626
const color = isDarkMode ? 'white' : 'black';
2727

2828
const handleClick = () => {
29-
if (contextInput === '' || contextInput === null) return;
29+
if (contextInput === '' || contextInput === null) {
30+
window.alert('must enter context name');
31+
return;
32+
}
3033
handleClickSelectContext();
3134
};
3235

0 commit comments

Comments
 (0)