Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const itemDetailsSlug = (title, id) => {
return `/items/${slugify(title)}/${id}`;
};
{form.fields.map(field => {
if (field.inputType === "textarea") {
return (
<label for="{slugify(field.label)}">{field.label}</label>
<textarea id="{slugify(field.label)}" name="{slugify(field.label)}" rows="5" cols="40"></textarea>
)
} else {
return (
<label for="{slugify(field.label)}">{field.label}</label>
filename(form) {
let slug = slugify(form.title.toLowerCase())
return `content/posts/${slug}.md`
},
frontmatter(form) {
exports.H4 = props =>
jsx("h4", {
css: {
fontSize: "1.5em",
fontWeight: "normal",
margin: "1em 0 0.25em"
},
id: slugify(jsx("h4", props)),
...props
});