refactor: conditionally render CheckboxButton in CodeInterpreter and WebSearch components for improved UI responsiveness

This commit is contained in:
Danny Avila 2025-06-22 11:58:15 -04:00
parent 9eb62370a4
commit 9375789f15
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
2 changed files with 22 additions and 18 deletions

View file

@ -26,6 +26,7 @@ function CodeInterpreter() {
return (
<>
{runCode && (
<CheckboxButton
ref={triggerRef}
className="max-w-fit"
@ -35,6 +36,7 @@ function CodeInterpreter() {
isCheckedClassName="border-purple-600/40 bg-purple-500/10 hover:bg-purple-700/10"
icon={<TerminalSquareIcon className="icon-md" />}
/>
)}
<ApiKeyDialog
onSubmit={onSubmit}
isOpen={isDialogOpen}

View file

@ -26,6 +26,7 @@ function WebSearch() {
return (
<>
{webSearch && (
<CheckboxButton
ref={triggerRef}
className="max-w-fit"
@ -35,6 +36,7 @@ function WebSearch() {
isCheckedClassName="border-blue-600/40 bg-blue-500/10 hover:bg-blue-700/10"
icon={<Globe className="icon-md" />}
/>
)}
<ApiKeyDialog
onSubmit={onSubmit}
authTypes={authTypes}