-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added slack messages - updated contentful usage - moved pages to general group folder
- Loading branch information
1 parent
59fc460
commit fdfe542
Showing
33 changed files
with
856 additions
and
259 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { Metadata } from 'next'; | ||
|
||
import LinkButton from '@components/LinkButton'; | ||
import ContactForm from '@components/forms/ContactForm'; | ||
|
||
export const metadata: Metadata = { | ||
title: 'Kontakt', | ||
description: 'Hier können Sie auf schnellem Weg mit mir in Kontakt treten.', | ||
}; | ||
|
||
const ResumePage = () => ( | ||
<div className="resume-page pt-4 lg:pt-10 lg:mr-80"> | ||
<section id="kontakt"> | ||
<h2>Kontakt</h2> | ||
|
||
<p className="mb-2">Der erste Schritt liegt bei Ihnen.</p> | ||
|
||
<p> | ||
Melden Sie sich gerne und wir setzen Ihr Vorhaben so um, wie Sie es sich vorstellen! | ||
</p> | ||
|
||
<div className="flex flex-wrap mt-10 gap-y-10"> | ||
<div className="flex-1"> | ||
<h3>Per Mail</h3> | ||
<LinkButton href="mailto:manuel@schaechinger.com">E-Mail senden</LinkButton> | ||
</div> | ||
|
||
<div className="flex-1"> | ||
<h3>Telefonisch</h3> | ||
<LinkButton href="tel:+4916097506593">Jetzt anrufen</LinkButton> | ||
</div> | ||
|
||
<div className="flex-none w-full"> | ||
<h3>Direkt schreiben</h3> | ||
|
||
<ContactForm /> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
); | ||
|
||
export default ResumePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
'use server'; | ||
|
||
import { ZodError, z } from 'zod'; | ||
import { sendMessage } from '../lib/slack'; | ||
|
||
export interface ContactFormState { | ||
success: boolean; | ||
message?: string; | ||
field?: string; | ||
} | ||
|
||
const ContactMessage = z.object({ | ||
name: z.string().min(2), | ||
email: z.string().email(), | ||
message: z.string().min(5), | ||
}); | ||
|
||
export const submitContact = async (state: Awaited<ContactFormState>, payload: FormData) => { | ||
try { | ||
const parsed = ContactMessage.parse({ | ||
name: payload.get('name'), | ||
email: payload.get('email'), | ||
message: payload.get('message'), | ||
}); | ||
|
||
const message = `Neue Kontakt-Anfrage: *${parsed.name}* (${parsed.email}):\n${parsed.message}`; | ||
|
||
await sendMessage(message); | ||
|
||
return { success: true }; | ||
} catch (e) { | ||
if (e instanceof ZodError) { | ||
const [error] = e.errors; | ||
|
||
return { success: false, field: error.path[0] } as ContactFormState; | ||
} else { | ||
return { success: false, field: 'form' }; | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.