Skip to content

Commit

Permalink
Remove unnecessary spinner
Browse files Browse the repository at this point in the history
(Since streaming makes the in-progress obvious anyway)
  • Loading branch information
s-h-a-d-o-w committed Nov 25, 2024
1 parent 643d081 commit cbcf302
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Binary file modified assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 8 additions & 5 deletions src/app/components/Prompt.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useChat } from "ai/react";
import { FormEvent } from "react";
import { IconButton } from "../../components/IconButton";
import Spinner from "../../components/Spinner";
import { Textarea } from "../../components/Textarea";
import { styled } from "../../../styled-system/jsx";

Expand Down Expand Up @@ -67,10 +66,14 @@ export function Prompt({
/>

{isLoading ? (
<>
<Spinner />
<IconButton name="stop" type="button" onClick={onClickStop} />
</>
<IconButton
name="stop"
type="button"
onClick={(event) => {
event.preventDefault();
onClickStop();
}}
/>
) : input ? (
<IconButton name="up" type="submit" />
) : (
Expand Down

0 comments on commit cbcf302

Please sign in to comment.