Skip to content

Commit 51d19a6

Browse files
committed
fix: resolve EmailJS reCAPTCHA error and add manifest.json
- Add missing manifest.json to fix 404 error - Add specific error handling for reCAPTCHA configuration issues - Improve error messages for EmailJS service configuration - Add helpful debugging information for troubleshooting - Fix PWA metadata and browser compatibility
1 parent 058463f commit 51d19a6

2 files changed

Lines changed: 43 additions & 17 deletions

File tree

public/manifest.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"short_name": "David Agustin",
3+
"name": "David Agustin - Full Stack Developer Portfolio",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": ".",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff",
15+
"description": "David Agustin's professional portfolio showcasing full-stack development projects and AI/ML expertise"
16+
}

src/components/Contact.tsx

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const Contact: React.FC = () => {
6262
subject: `Portfolio Contact from ${formData.name.trim()}`,
6363
};
6464

65-
// Send email using EmailJS
65+
// Send email using EmailJS (without reCAPTCHA)
6666
const result = await emailjs.send(
6767
'service_vdkx6od',
6868
'template_8u7ryea',
@@ -93,22 +93,32 @@ const Contact: React.FC = () => {
9393
type: 'error',
9494
});
9595
}
96-
} catch (error) {
97-
console.error('Error sending email:', error);
98-
setSnackbar({
99-
isOpen: true,
100-
message: 'Network error. Please check your connection and try again.',
101-
type: 'error',
102-
});
103-
104-
// Log additional error details for debugging
105-
if (error instanceof Error) {
106-
console.error('Error details:', {
107-
message: error.message,
108-
stack: error.stack
109-
});
110-
}
111-
} finally {
96+
} catch (error) {
97+
console.error('Error sending email:', error);
98+
99+
// Check for reCAPTCHA error
100+
if (error instanceof Error && error.message.includes('reCAPTCHA')) {
101+
setSnackbar({
102+
isOpen: true,
103+
message: 'Email service configuration error. Please contact the site administrator.',
104+
type: 'error',
105+
});
106+
} else {
107+
setSnackbar({
108+
isOpen: true,
109+
message: 'Network error. Please check your connection and try again.',
110+
type: 'error',
111+
});
112+
}
113+
114+
// Log additional error details for debugging
115+
if (error instanceof Error) {
116+
console.error('Error details:', {
117+
message: error.message,
118+
stack: error.stack
119+
});
120+
}
121+
} finally {
112122
setIsSubmitting(false);
113123
}
114124
};

0 commit comments

Comments
 (0)