From d9ddffacb191c13c11700031156afd1449faca1c Mon Sep 17 00:00:00 2001 From: ARC Developer Date: Thu, 10 Jul 2025 20:31:49 +0300 Subject: [PATCH] feat: add contact form with Netlify integration and success/error messages --- src/components/ui/Form.astro | 10 +++++++++- src/pages/iletisim.astro | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/components/ui/Form.astro b/src/components/ui/Form.astro index 615d9d2..84db7e0 100644 --- a/src/components/ui/Form.astro +++ b/src/components/ui/Form.astro @@ -5,7 +5,15 @@ import Button from '~/components/ui/Button.astro'; const { inputs, textarea, disclaimer, button = 'İletişim', description = '' } = Astro.props; --- -
+ + +
+ +
+ { inputs && inputs.map( diff --git a/src/pages/iletisim.astro b/src/pages/iletisim.astro index 75058bf..abcb9c2 100644 --- a/src/pages/iletisim.astro +++ b/src/pages/iletisim.astro @@ -7,9 +7,37 @@ import Features2 from '~/components/widgets/Features2.astro'; const metadata = { title: '📡 İletişim - ARC YM1KTC', }; + +// Check for success/error parameters +const url = Astro.url; +const success = url.searchParams.get('success'); +const error = url.searchParams.get('error'); --- + + {success && ( +
+
+ + + + Başarılı! Mesajınız başarıyla gönderildi. En kısa sürede size dönüş yapacağız. 73! +
+
+ )} + + {error && ( +
+
+ + + + Hata! Mesaj gönderilirken bir sorun oluştu. Lütfen tekrar deneyin veya doğrudan e-posta gönderin. +
+
+ )} +