Skip to content

Commit

Permalink
Renamed component rendering streamed data in real time
Browse files Browse the repository at this point in the history
  • Loading branch information
Bianca Wentzel committed Dec 11, 2024
1 parent f9fab2f commit c409b1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Markdown from "react-markdown";
import Highlight from "react-highlight";
import "highlight.js/styles/atom-one-light.css";

function AnswerComponent(props) {
function PendingAnswerComponent(props) {
const [renderedCode, setRenderedCode] = useState("");

useEffect(() => {
Expand Down Expand Up @@ -78,9 +78,9 @@ function AnswerComponent(props) {
return renderAnswer(props);
}

AnswerComponent.propTypes = {
PendingAnswerComponent.propTypes = {
content: PropTypes.string,
variant: PropTypes.string,
};

export default AnswerComponent;
export default PendingAnswerComponent;
4 changes: 2 additions & 2 deletions assets/js/Containers/FrevaGPT/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Spinner from "../../Components/Spinner";

import ChatBlock from "./components/ChatBlock";
import SidePanel from "./components/SidePanel";
import AnswerComponent from "./components/AnswerComponent";
import PendingAnswerComponent from "./components/PendingAnswerComponent";

import { objectToQueryString, truncate } from "./utils";

Expand Down Expand Up @@ -337,7 +337,7 @@ class FrevaGPT extends React.Component {

<ChatBlock />

<AnswerComponent
<PendingAnswerComponent
content={this.state.dynamicAnswer}
variant={this.state.dynamicVariant}
/>
Expand Down

0 comments on commit c409b1e

Please sign in to comment.