File tree Expand file tree Collapse file tree 5 files changed +17
-9
lines changed Expand file tree Collapse file tree 5 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ const AuthForm = ({ type }) => {
57
57
label = { t ( 'label.email' ) }
58
58
autocomplete = { fieldTypes . email }
59
59
name = { fieldTypes . email }
60
+ type = "email"
60
61
validate = { [ emailValidator ] }
61
62
/>
62
63
)
Original file line number Diff line number Diff line change @@ -67,8 +67,6 @@ const SearchFormComponent: React.FunctionComponent<Props> = ({
67
67
const { t } = useTranslation ( )
68
68
const onSubmit = ( values : any ) => {
69
69
const query = toQueryBasic ( values )
70
-
71
- console . log ( 'query' , query )
72
70
closeModal ( )
73
71
if ( query ) {
74
72
router . push ( {
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ const BaseInput = forwardRef(
65
65
small && styles . small
66
66
) }
67
67
value = { value }
68
- autoComplete = { autocomplete }
69
68
{ ...inputProps }
69
+ autoComplete = { autocomplete }
70
70
/>
71
71
)
72
72
return (
@@ -77,8 +77,8 @@ const BaseInput = forwardRef(
77
77
small && styles . small
78
78
) }
79
79
value = { value }
80
- autoComplete = { autocomplete }
81
80
{ ...inputProps }
81
+ autoComplete = { autocomplete }
82
82
/>
83
83
)
84
84
}
@@ -112,7 +112,7 @@ BaseInput.defaultProps = {
112
112
min : null ,
113
113
hasLabel : false ,
114
114
type : '' ,
115
- autocomplete : '' ,
115
+ autocomplete : 'off ' ,
116
116
}
117
117
118
118
export default memo ( BaseInput )
Original file line number Diff line number Diff line change @@ -32,13 +32,15 @@ class FeathersClient {
32
32
service = ( service ) => this . app . service ( service )
33
33
34
34
disconnect = async ( ) => {
35
+ console . log ( 'Disconnecting...' )
35
36
if ( process . browser ) {
36
37
window . localStorage . removeItem ( 'feathers-jwt' )
37
- await this . feathers . logout ( )
38
+ await this . app . logout ( )
38
39
}
39
40
}
40
41
41
42
reAuthenticate = ( ) => {
43
+ console . log ( 'Re-authenticating...' )
42
44
try {
43
45
this . app . reAuthenticate ( )
44
46
} catch ( e ) {
@@ -48,10 +50,13 @@ class FeathersClient {
48
50
}
49
51
50
52
authenticate = async ( config ) => {
53
+ console . log ( 'Authenticating...' )
51
54
try {
52
55
if ( process . browser ) {
53
- window . localStorage . setItem ( 'feathers-jwt' , accessToken )
54
- await this . app . authenticate ( config )
56
+ const response = await this . app . authenticate ( config )
57
+ if ( response . accessToken )
58
+ window . localStorage . setItem ( 'feathers-jwt' , response . accessToken )
59
+ return response
55
60
}
56
61
} catch ( e ) {
57
62
console . error ( 'Authentication error' , e )
Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ import {
13
13
ListingsCarousel ,
14
14
InfinitePagination ,
15
15
Layout ,
16
+ Loader ,
16
17
} from '../../components'
17
18
import {
18
19
listingPaginationSelector ,
19
20
listingsSelector ,
21
+ listingsLoadingSelector ,
20
22
} from '../../store/listing/selectors'
21
23
import Creators from '../../store/listing/creators'
22
24
import styles from './search.module.scss'
@@ -61,6 +63,7 @@ const SearchPage: React.FunctionComponent = () => {
61
63
const pagination = useSelector ( listingPaginationSelector )
62
64
const listings = useSelector ( listingsSelector )
63
65
const makes = useSelector ( makesSelector )
66
+ const loading = useSelector ( listingsLoadingSelector )
64
67
const count = get ( pagination , 'total' , 0 )
65
68
66
69
const fetch = ( resetPagination = false ) => {
@@ -124,7 +127,8 @@ const SearchPage: React.FunctionComponent = () => {
124
127
return (
125
128
< Layout background = "white" fullscreen className = { styles . layout } >
126
129
< div className = { styles . search } >
127
- < h1 > { `${ t ( 'titles.foundVehicles' ) } : ${ count } ` } </ h1 >
130
+ { loading && < Loader loading /> }
131
+ { ! loading && < h1 > { `${ t ( 'titles.foundVehicles' ) } : ${ count } ` } </ h1 > }
128
132
< SearchForm
129
133
cb = { ( ) => fetch ( true ) }
130
134
defaultExpanded = { defaultExpanded }
You can’t perform that action at this time.
0 commit comments