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

View file

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