feat(landing): Add kontakt, datenschutz pages, integrate brevo newsletter and contact, add error-handler

This commit is contained in:
2026-01-11 10:57:45 +01:00
parent b5417ef7c6
commit d8b7e193a9
25 changed files with 1066 additions and 53 deletions

View File

@@ -4,24 +4,20 @@ export function useNewsletterSignup() {
const isSuccess = ref(false)
const error = ref<string | null>(null)
const submitEmail = async (_email: string) => {
const submitEmail = async (email: string) => {
isLoading.value = true
error.value = null
try {
// Simulate API call - replace with actual newsletter service integration
await new Promise((resolve) => setTimeout(resolve, 1500))
// TODO: Integrate with external newsletter service (e.g., Mailchimp, ConvertKit, etc.)
// Example:
// await $fetch('/api/newsletter/subscribe', {
// method: 'POST',
// body: { email }
// })
await $fetch('/api/newsletter/subscribe', {
method: 'POST',
body: { email }
})
isSuccess.value = true
} catch (e: unknown) {
error.value = e instanceof Error ? e.message : t('errors.generic')
const fetchError = e as { statusMessage?: string }
error.value = fetchError.statusMessage || t('errors.generic')
throw e
} finally {
isLoading.value = false