From 1593540bccb7e2a4c7716797d1de9f56d1a0e695 Mon Sep 17 00:00:00 2001 From: Deryk DeGuzman Date: Mon, 23 Sep 2024 10:02:48 -0700 Subject: [PATCH] fix: update docs page props --- docs/package-lock.json | 2 +- docs/src/index.tsx | 16 +++++++++++----- package-lock.json | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index fa37673..7df038b 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -14,7 +14,7 @@ }, "..": { "name": "@vectara/react-chatbot", - "version": "3.0.0", + "version": "3.0.1", "license": "Apache-2.0", "dependencies": { "@types/react": "^17.0.0", diff --git a/docs/src/index.tsx b/docs/src/index.tsx index c9484f1..353f21b 100644 --- a/docs/src/index.tsx +++ b/docs/src/index.tsx @@ -2,7 +2,13 @@ import { ChangeEvent, useCallback, useState } from "react"; import ReactDOM from "react-dom"; import { BiLogoGithub } from "react-icons/bi"; import JsxParser from "react-jsx-parser"; -import { ReactChatbot, SummaryLanguage, DEFAULT_SUMMARIZER, DEFAULT_RERANKER_ID, DEFAULT_LAMBDA_VALUE } from "@vectara/react-chatbot"; +import { + ReactChatbot, + SummaryLanguage, + DEFAULT_SUMMARIZER, + DEFAULT_RERANKER_ID, + DEFAULT_LAMBDA_VALUE +} from "@vectara/react-chatbot"; import { VuiAppContent, VuiAppHeader, @@ -22,7 +28,7 @@ import { HeaderLogo } from "./components/HeaderLogo"; import { ConfigurationDrawer } from "components/ConfigurationDrawer"; import "./ui/_index.scss"; import "./index.scss"; -import {RerankerId} from "../../src/types"; +import { RerankerId } from "../../src/types"; const formatStringProp = (value?: string) => { if (!value) { @@ -45,7 +51,7 @@ const generateCodeSnippet = ( exampleQuestions?: string, rerankerId?: RerankerId, lambda?: number, - isStreamingEnabled?: boolean, + isStreamingEnabled?: boolean ) => { const props = [ `customerId="${customerId === "" ? "" : customerId}"`, @@ -159,7 +165,7 @@ const App = () => { ); }, [emptyStateJsx]); - const parsedExampleQuestions = exampleQuestions && exampleQuestions.split(","); + const parsedExampleQuestions = exampleQuestions ? exampleQuestions.split(",") : undefined; return ( <> @@ -212,7 +218,7 @@ const App = () => { * This ensures that we don't voluntarily display the docs corpus details in the text fields. */}