Skip to content

Commit

Permalink
added contact form action in config
Browse files Browse the repository at this point in the history
  • Loading branch information
tfsomrat committed Feb 11, 2023
1 parent 2e3450f commit 8cb29a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

"params": {
"tag_manager_id": "",
"contact_form_action": "#",
"copyright": "Copyright © 2022 a theme by [themefisher](https://themefisher.com)"
},

Expand Down
8 changes: 7 additions & 1 deletion layouts/Contact.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import config from "@config/config";
import { markdownify } from "@lib/utils/textConverter";

const Contact = ({ data }) => {
const { frontmatter } = data;
const { title } = frontmatter;
const { contact_form_action } = config.params;

return (
<section className="section">
<div className="container max-w-[700px]">
{markdownify(title, "h1", "h2 mb-8 text-center")}
<form className="contact-form">
<form
className="contact-form"
method="POST"
action={contact_form_action}
>
<div className="mb-6">
<label className="mb-2 block" htmlFor="name">
Name
Expand Down

1 comment on commit 8cb29a1

@vercel
Copy link

@vercel vercel bot commented on 8cb29a1 Feb 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.