Skip to content
Snippets Groups Projects
Commit e541bf3f authored by metourneau's avatar metourneau
Browse files

fix no button action if empty

parent 7507a51b
No related branches found
No related tags found
No related merge requests found
......@@ -120,7 +120,7 @@ const Hero = (props: Props) => {
<div className="text-primary">{subtitle}</div>
</h1>
<p className="mb-5">{content}</p>
{action ? (
{action && action.name !== "" ? (
<Button
className="btn-primary mt-10 text-white"
{...action}
......
......@@ -126,7 +126,7 @@ const Component = (props: IComponent) => {
case "hero":
let heroaction = actions?.length
? actions[0]
: { title: "", to: "" }
: { name: "", url: "" }
return (
<Hero
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment