fix: show reset_link in button URL variable suggestions

Button modals in both RichTextEditor and EmailBuilder filtered
for _url variables only, excluding reset_link. Updated filter to
include both _url and _link patterns.

Files changed:
- rich-text-editor.tsx line 415
- EmailBuilder.tsx line 359
This commit is contained in:
Dwindi Ramadhana
2026-01-01 22:12:26 +07:00
parent 6bd50c1659
commit 1af1add5d4
2 changed files with 2 additions and 2 deletions

View File

@@ -356,7 +356,7 @@ export function EmailBuilder({ blocks, onChange, variables = [] }: EmailBuilderP
/> />
{variables.length > 0 && ( {variables.length > 0 && (
<div className="flex flex-wrap gap-1 mt-2"> <div className="flex flex-wrap gap-1 mt-2">
{variables.filter(v => v.includes('_url')).map((variable) => ( {variables.filter(v => v.includes('_url') || v.includes('_link')).map((variable) => (
<code <code
key={variable} key={variable}
className="text-xs bg-muted px-2 py-1 rounded cursor-pointer hover:bg-muted/80" className="text-xs bg-muted px-2 py-1 rounded cursor-pointer hover:bg-muted/80"

View File

@@ -412,7 +412,7 @@ export function RichTextEditor({
/> />
{variables.length > 0 && ( {variables.length > 0 && (
<div className="flex flex-wrap gap-1 mt-2"> <div className="flex flex-wrap gap-1 mt-2">
{variables.filter(v => v.includes('_url')).map((variable) => ( {variables.filter(v => v.includes('_url') || v.includes('_link')).map((variable) => (
<code <code
key={variable} key={variable}
className="text-xs bg-muted px-2 py-1 rounded cursor-pointer hover:bg-muted/80" className="text-xs bg-muted px-2 py-1 rounded cursor-pointer hover:bg-muted/80"