fix linting errors

This commit is contained in:
leander committed 2024-08-01 17:24:33 +02:00
1 parent 09497313f2
commit 54a0466de7
6 files changed
+8 -11

No files matched your search

+1 -1
View File
@@ -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');
}
+1 -3
View File
@@ -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>
+1 -1
View File
@@ -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,