mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20:15 +01:00
♻️ refactor: Login and Registration component Improvement (#2716)
* ♻️ refactor: Login form improvement * display error message when API is down * add loading animation to Login form while fetching data * optimize startupConfig to fetch data only on initial render to prevent unnecessary API calls * 🚑 fix: clear authentication error messages on successful login * ♻️ refactor: componentize duplicate codes on registration and login screens * chore: update types * refactor: layout rendering order * refactor: startup title fix * refactor: reset/request-reset-password under new AuthLayout * ci: fix Login.spec.ts * ci: fix registration.spec.tsx --------- Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
2b7a973a33
commit
9f2538fcd9
19 changed files with 775 additions and 750 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { useState } from 'react';
|
||||
import { Import } from 'lucide-react';
|
||||
import type { TError } from 'librechat-data-provider';
|
||||
import { useUploadConversationsMutation } from '~/data-provider';
|
||||
import { useLocalize, useConversations } from '~/hooks';
|
||||
import { useToastContext } from '~/Providers';
|
||||
|
|
@ -25,8 +26,7 @@ function ImportConversations() {
|
|||
console.error('Error: ', error);
|
||||
setAllowImport(true);
|
||||
setError(
|
||||
(error as { response: { data: { message?: string } } })?.response?.data?.message ??
|
||||
'An error occurred while uploading the file.',
|
||||
(error as TError)?.response?.data?.message ?? 'An error occurred while uploading the file.',
|
||||
);
|
||||
if (error?.toString().includes('Unsupported import type')) {
|
||||
showToast({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue