diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-02-12 18:36:57 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-02-12 18:36:57 -0600 |
| commit | b7151f39ceac6049b928767df315d742048f8d3e (patch) | |
| tree | c70c6cf2a45e0c4323fe1885ada3f2fb034c5a54 /src/web | |
| parent | a3f331c61bb344841c0941d844de125ed7458c0a (diff) | |
| download | slskd-b7151f39ceac6049b928767df315d742048f8d3e.tar.gz | |
memoize logo
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/src/components/LoginForm.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/src/components/LoginForm.js b/src/web/src/components/LoginForm.js index 44043ddb..a71e6b1a 100644 --- a/src/web/src/components/LoginForm.js +++ b/src/web/src/components/LoginForm.js @@ -12,6 +12,7 @@ const initialState = { const LoginForm = ({ onLoginAttempt, loading, error }) => { const [state, setState] = useState(initialState); const [ready, setReady] = useState(false); + const logo = useMemo(() => Logos[Math.floor(Math.random() * Logos.length)], []); useEffect(() => { if (state.username !== '' && state.password !== '') { |
