mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
* ♻️ 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>
29 lines
443 B
TypeScript
29 lines
443 B
TypeScript
export const BlinkAnimation = ({
|
|
active,
|
|
children,
|
|
}: {
|
|
active: boolean;
|
|
children: React.ReactNode;
|
|
}) => {
|
|
const style = `
|
|
@keyframes blink-animation {
|
|
0%,
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0;
|
|
}
|
|
}`;
|
|
|
|
if (!active) {
|
|
return <>{children}</>;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<style>{style}</style>
|
|
<div style={{ animation: 'blink-animation 3s infinite' }}>{children}</div>
|
|
</>
|
|
);
|
|
};
|