diff --git a/clients/search-component/example/src/routes/ecommerce.tsx b/clients/search-component/example/src/routes/ecommerce.tsx index cc5baf678f..88851531b3 100644 --- a/clients/search-component/example/src/routes/ecommerce.tsx +++ b/clients/search-component/example/src/routes/ecommerce.tsx @@ -2,7 +2,6 @@ import { TrieveModalSearch } from "../../../src/index"; import "../../../dist/index.css"; import { useState } from "react"; - import { createFileRoute } from "@tanstack/react-router"; export const Route = createFileRoute("/ecommerce")({ diff --git a/clients/search-component/src/TrieveModal/Chat/ChatMode.tsx b/clients/search-component/src/TrieveModal/Chat/ChatMode.tsx index e5a0496db6..123292860e 100644 --- a/clients/search-component/src/TrieveModal/Chat/ChatMode.tsx +++ b/clients/search-component/src/TrieveModal/Chat/ChatMode.tsx @@ -1,4 +1,4 @@ -import React, { Suspense } from "react"; +import React, { Suspense, useEffect, useRef } from "react"; import { useModalState } from "../../utils/hooks/modal-context"; import { AIInitialMessage } from "./AIInitalMessage"; import { useChatState } from "../../utils/hooks/chat-context"; @@ -27,9 +27,9 @@ export const ChatMode = () => { stopGeneratingMessage, } = useChatState(); - const chatInput = React.useRef(null); + const chatInput = useRef(null); - React.useEffect(() => { + useEffect(() => { if (mode == "chat" && open) { chatInput.current?.focus(); } diff --git a/clients/search-component/src/TrieveModal/Search/ProductItem.tsx b/clients/search-component/src/TrieveModal/Search/ProductItem.tsx index e1e96f2dd4..2af0d468e7 100644 --- a/clients/search-component/src/TrieveModal/Search/ProductItem.tsx +++ b/clients/search-component/src/TrieveModal/Search/ProductItem.tsx @@ -148,7 +148,10 @@ export const ProductItem = ({ {group && ( - - + {% endfor %}