This commit is contained in:
@@ -25,9 +25,8 @@ export default function Login() {
|
||||
}, [auth]);
|
||||
|
||||
const doLogin = useCallback(async () => {
|
||||
const length = loginRef?.current?.value && loginRef?.current?.value.length && loginRef.current.value.replace(/\s/g, '').length
|
||||
const length = loginRef?.current?.value.length && loginRef.current.value.replace(/\s/g, '').length
|
||||
if (length) {
|
||||
// TODO odchytávat cokoliv mimo 200
|
||||
const token = await login(loginRef.current?.value);
|
||||
if (token) {
|
||||
auth?.setToken(token);
|
||||
@@ -35,7 +34,7 @@ export default function Login() {
|
||||
}
|
||||
}, [auth]);
|
||||
|
||||
if (!auth || !auth.login) {
|
||||
if (!auth?.login) {
|
||||
return <div className='login'>
|
||||
<h1>Luncher</h1>
|
||||
<h4 style={{ marginBottom: "50px" }}>Aplikace pro profesionální management obědů</h4>
|
||||
|
||||
Reference in New Issue
Block a user