mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
fix(balance/models): request only when authenticated, modelsQuery "optimistic" update (#1031)
* fix(balanceQuery/modelsQuery): request only when authenticated * style: match new chat capitalization to official * fix(modelsQuery): update selected model optimistically * ci: update e2e changes, disable title in ci env * fix(ci): get new chat button by data-testid and not text
This commit is contained in:
parent
2dd545eaa4
commit
b3aac97710
10 changed files with 34 additions and 15 deletions
|
|
@ -17,12 +17,14 @@ import { cn } from '~/utils/';
|
|||
import store from '~/store';
|
||||
|
||||
export default function NavLinks() {
|
||||
const balanceQuery = useGetUserBalance();
|
||||
const { user, isAuthenticated } = useAuthContext();
|
||||
const { data: startupConfig } = useGetStartupConfig();
|
||||
const balanceQuery = useGetUserBalance({
|
||||
enabled: !!isAuthenticated && startupConfig?.checkBalance,
|
||||
});
|
||||
const [showExports, setShowExports] = useState(false);
|
||||
const [showClearConvos, setShowClearConvos] = useState(false);
|
||||
const [showSettings, setShowSettings] = useState(false);
|
||||
const { user } = useAuthContext();
|
||||
const localize = useLocalize();
|
||||
|
||||
const conversation = useRecoilValue(store.conversation) ?? ({} as TConversation);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export default function NewChat() {
|
|||
|
||||
return (
|
||||
<a
|
||||
data-testid="new-chat-button"
|
||||
onClick={clickHandler}
|
||||
className="flex h-11 flex-shrink-0 flex-grow cursor-pointer items-center gap-3 rounded-md border border-white/20 px-3 py-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue