Skip to content

Commit

Permalink
Fix react rendering infinite loop in Ask ChatGPT command (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristenbrann authored Mar 13, 2023
1 parent a4091df commit 1d42ed1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ChatGPTModalComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ChatGPTModalComponent: React.FC<Props> = (props: Props) => {
const [showIndexingBanner, setShowIndexingBanner] = useState(true)

isIndexingComplete.then(() => {
setShowIndexingBanner(false)
if (showIndexingBanner) setShowIndexingBanner(false)
})
const userMessageOnChange = (e: { target: { value: React.SetStateAction<string>; }; }) => {
setButtonDisabled(e.target.value.length === 0)
Expand Down

0 comments on commit 1d42ed1

Please sign in to comment.