Fixed Erase button running flow

This commit is contained in:
Lucas Oliveira 2024-06-06 11:12:31 -03:00
commit e191a16bf8
2 changed files with 7 additions and 2 deletions

View file

@ -59,6 +59,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
variant,
size,
loading,
type,
disabled,
asChild = false,
children,
@ -76,6 +77,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
<Comp
className={cn(buttonVariants({ variant, size, className }))}
disabled={loading || disabled}
{...(asChild ? {} : { type: type || "button" })}
ref={ref}
{...props}
>

View file

@ -24,6 +24,7 @@ import { chatViewProps } from "../../../../types/components";
import { classNames } from "../../../../utils/utils";
import ChatInput from "./chatInput";
import ChatMessage from "./chatMessage";
import { Button } from "../../../../components/ui/button";
export default function ChatView({
sendMessage,
@ -166,8 +167,10 @@ export default function ChatView({
<div className="eraser-column-arrangement">
<div className="eraser-size">
<div className="eraser-position">
<button
<Button
className="flex gap-1"
size="none"
variant="none"
onClick={() => handleSelectChange("builds")}
>
<IconComponent
@ -178,7 +181,7 @@ export default function ChatView({
)}
aria-hidden="true"
/>
</button>
</Button>
{/* <Select
onValueChange={handleSelectChange}
value=""