Revize d963a25c
Přidáno uživatelem Michal Schwob před více než 1 rok
src/pages/LoginPage.tsx | ||
---|---|---|
1 | 1 |
import { |
2 | 2 |
Center, |
3 |
Box, |
|
4 | 3 |
Heading, |
5 | 4 |
VStack, |
6 | 5 |
FormControl, |
7 |
Link, |
|
8 | 6 |
Input, |
9 | 7 |
Button, |
10 |
HStack, |
|
11 | 8 |
Text, |
12 |
KeyboardAvoidingView, useToast, ScrollView |
|
9 |
KeyboardAvoidingView, |
|
10 |
useToast |
|
13 | 11 |
} from "native-base" |
14 |
import { useCallback, useEffect, useState } from "react"
|
|
12 |
import { useEffect, useState } from "react" |
|
15 | 13 |
import { useDispatch, useSelector } from "react-redux" |
16 | 14 |
import { checkAuth, login } from "../stores/actions/userThunks" |
17 | 15 |
import { AppDispatch, RootState } from "../stores/store" |
18 | 16 |
import { Platform } from "react-native" |
19 | 17 |
import { log } from "../logging/logger" |
20 |
import * as SplashScreen from "expo-splash-screen" |
|
21 | 18 |
import { ApplicationHeading } from "../components/reusables/ApplicationHeading" |
22 |
import {consumeError} from "../stores/reducers/userSlice" |
|
23 | 19 | |
24 | 20 | |
25 | 21 |
const LoginPage = () => { |
... | ... | |
48 | 44 |
placement: "top", |
49 | 45 |
duration: 3000, |
50 | 46 |
}) |
51 |
// dispatch(consumeError()) |
|
52 | 47 |
} |
53 | 48 |
}, [lastError]); |
54 | 49 | |
... | ... | |
58 | 53 |
flex={ 1 } |
59 | 54 |
justifyContent={ "center" } |
60 | 55 |
h={ {lg: "auto"} } |
61 |
// behavior={ "padding" } |
|
62 | 56 |
keyboardVerticalOffset={ 100 } |
63 | 57 |
> |
64 | 58 | |
... | ... | |
88 | 82 |
Please log in to continue |
89 | 83 |
</Text> |
90 | 84 |
{ lastError && ( |
91 |
<ScrollView> |
|
92 |
<Text |
|
93 |
mt="1" |
|
94 |
textAlign="center" |
|
95 |
color="error.500" |
|
96 |
> |
|
97 |
{ lastError } |
|
98 |
</Text> |
|
99 |
</ScrollView> |
|
85 |
<Text |
|
86 |
mt="1" |
|
87 |
textAlign="center" |
|
88 |
color="error.500" |
|
89 |
> |
|
90 |
{ lastError } |
|
91 |
</Text> |
|
100 | 92 |
) } |
101 | 93 | |
102 | 94 |
<VStack space={ 3 } > |
Také k dispozici: Unified diff
REVERT: reverting debug toasts
re #10822