mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Clean up all references to authenticatedData
- De facto, was being assumed everywhere if authenticatedData is null, that it's not logged in. This isn't true because the data can still be loading. Update the hook to send additional states. - Bonus: Delete model picker code and a slew of unused imports.
This commit is contained in:
@@ -193,7 +193,11 @@ export default function Chat() {
|
||||
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
},
|
||||
};
|
||||
const authenticatedData = useAuthenticatedData();
|
||||
const {
|
||||
data: authenticatedData,
|
||||
error: authenticationError,
|
||||
isLoading: authenticationLoading,
|
||||
} = useAuthenticatedData();
|
||||
const isMobileWidth = useIsMobileWidth();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -425,7 +429,7 @@ export default function Chat() {
|
||||
<div className={styles.chatBoxBody}>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<ChatBodyData
|
||||
isLoggedIn={authenticatedData !== null}
|
||||
isLoggedIn={authenticatedData ? true : false}
|
||||
streamedMessages={messages}
|
||||
setStreamedMessages={setMessages}
|
||||
chatOptionsData={chatOptionsData}
|
||||
|
||||
Reference in New Issue
Block a user