fix linting errors
This commit is contained in:
6 files changed
+8
-11
No files matched your search
@@ -65,7 +65,7 @@ const useEventList = () => {
|
||||
let eventData;
|
||||
try {
|
||||
const res = await fetchWithTimeout(url);
|
||||
if (res.status == 418) {
|
||||
if (res.status === 418) {
|
||||
// TODO: temporary. Remove once new website is up and running
|
||||
throw new Error('I am a teapot');
|
||||
}
|
||||
|
||||
@@ -79,9 +79,7 @@ const UserRegister = () => {
|
||||
returnKeyType="send"
|
||||
onSubmitEditing={onSubmit}
|
||||
/>
|
||||
<View style={styles.errorBox}>
|
||||
{registerError && isSubmitted && <FormErrors errors={registerError} />}
|
||||
</View>
|
||||
<View style={styles.errorBox}>{registerError && isSubmitted && <FormErrors errors={registerError} />}</View>
|
||||
<Button fullWidth disabled={isDisabled} onPress={onSubmit} style={styles.registerButton} type="submit">
|
||||
<Text>Registrer meg</Text>
|
||||
</Button>
|
||||
|
||||
@@ -64,7 +64,7 @@ const useUserRegister = () => {
|
||||
Object.keys(registerError).forEach((key) => {
|
||||
setError(key as keyof UserRegisterFormValues, { type: 'server', message: registerError[key].join('\n') });
|
||||
});
|
||||
}, [registerError]);
|
||||
}, [registerError, isSubmitted, clearErrors, setError]);
|
||||
|
||||
return {
|
||||
isRegisteringUser,
|
||||
|
||||
Reference in new issue
Block a user