I am working on a shopify extension react component and want to add text dynamically from settings(shopify feature). My main goal is to find the {link_placeholder} string in to the text and change it with real text. my component looks like this
function Extension() {
const {static_content_text} = useSettings();
const link = "https://test.com";
const link_text = "some link text";
const replacedText = static_content_text.replace(
/\{LINK_PLACEHOLDER\}/g,
`<Link appearance="base" to="${link}">${link_text}</Link>`
);
return (
<BlockStack>
<Text>
{replacedText}
</Text>
</BlockStack>
);
}
the problem is that link tags are inserted as a plain text and not rendered as an actual link,
how can it be solved? thanks in advance