fix: Adjust error message formatting for better readability in multiple components

This commit is contained in:
Mo Tarbin
2025-06-14 00:06:25 -04:00
parent 6be22170d8
commit c7e2cb9d06
7 changed files with 12 additions and 8 deletions

View File

@@ -106,7 +106,8 @@ const LoginSettings = () => {
if (!isValidServerURL()) {
showError({
title: 'Invalid Server URL',
message: 'Please enter a valid server URL with protocol (http:// or https://)',
message:
'Please enter a valid server URL with protocol (http:// or https://)',
})
return
}

View File

@@ -397,7 +397,8 @@ const LoginView = () => {
onReject={() => {
showError({
title: 'Google Login Failed',
message: "Couldn't log in with Google, please try again",
message:
"Couldn't log in with Google, please try again",
})
}}
>

View File

@@ -104,14 +104,14 @@ const SignupView = () => {
} else if (response.status === 403) {
showError({
title: 'Signup Failed',
message: 'Signup disabled, please contact admin'
message: 'Signup disabled, please contact admin',
})
} else {
console.log('Signup failed')
response.json().then(res => {
showError({
title: 'Signup Failed',
message: res.error || 'An error occurred during signup'
message: res.error || 'An error occurred during signup',
})
})
}

View File

@@ -18,7 +18,6 @@ import {
RadioGroup,
Select,
Sheet,
Stack,
Switch,
Typography,
} from '@mui/joy'

View File

@@ -315,7 +315,8 @@ const MyChores = () => {
case 'archive':
showSuccess({
title: 'Task Archived',
message: 'The task has been archived and hidden from the active list.',
message:
'The task has been archived and hidden from the active list.',
})
break
default:

View File

@@ -147,7 +147,8 @@ const NotificationSetting = () => {
} else if (resp.display === 'denied') {
showWarning({
title: 'Notification Permission Denied',
message: 'You have denied notification permissions. You can enable them later in your device settings.',
message:
'You have denied notification permissions. You can enable them later in your device settings.',
})
setDeviceNotification(false)
setNotificationPreferences({ granted: false })

View File

@@ -104,7 +104,8 @@ const ProfileSettings = () => {
} catch (err) {
showError({
title: 'Update Failed',
message: 'Unable to update your profile. Please check your connection and try again.',
message:
'Unable to update your profile. Please check your connection and try again.',
})
} finally {
setIsSaving(false)