diff --git a/surfsense_web/components/chat/ChatInterface.tsx b/surfsense_web/components/chat/ChatInterface.tsx index 2d5830fd7..c36725133 100644 --- a/surfsense_web/components/chat/ChatInterface.tsx +++ b/surfsense_web/components/chat/ChatInterface.tsx @@ -43,12 +43,6 @@ export default function ChatInterface({ searchMode, onSearchModeChange, }: ChatInterfaceProps) { - const [token, setToken] = useState(null); - useEffect(() => { - const bearerToken = localStorage.getItem("surfsense_bearer_token"); - setToken(bearerToken); - }, []); - const { chat_id, search_space_id } = useParams(); const [chatDetails, setChatDetails] = useState(null); const [isChatPannelOpen, setIsChatPannelOpen] = useState(false); @@ -65,7 +59,7 @@ export default function ChatInterface({ const { getPodcastByChatId } = usePodcast(); const { fetchChatDetails } = useChatAPI({ - token, + token: localStorage?.getItem("surfsense_bearer_token"), search_space_id: search_space_id as string, }); diff --git a/surfsense_web/components/chat/ChatPanel/ChatPanelView.tsx b/surfsense_web/components/chat/ChatPanel/ChatPanelView.tsx index a489dde63..cc86c82c4 100644 --- a/surfsense_web/components/chat/ChatPanel/ChatPanelView.tsx +++ b/surfsense_web/components/chat/ChatPanel/ChatPanelView.tsx @@ -35,8 +35,6 @@ export function ChatPanelView(props: ChatPanelViewProps) { }); }, [chatDetails, generatePodcast]); - console.log("podcastIsStale", podcastIsStale); - return (