There was an error while loading. Please reload this page.
2 parents 3f4ea44 + c862a27 commit df387a7Copy full SHA for df387a7
1 file changed
packages/snippets/src/components/snippet-viewer/footer/index.tsx
@@ -24,8 +24,17 @@ const Footer: FC<Props> = (props) => {
24
<button className="snippet-viewer-footer__btn" onClick={onCopy}>
25
{isCopied ? 'Copied!' : 'Copy'} <Copy size={14} />
26
</button>
27
- {snippet.template.config.docs && (
28
- <a type="button" href={snippet.template.config.docs} className="snippet-viewer-footer__btn" onClick={onCopy}>
+ {(typeof snippet.snippet.payload?.docs === 'string' ||
+ snippet.template.config.docs) && (
29
+ <a
30
+ type="button"
31
+ href={
32
+ (snippet.snippet.payload?.docs as string) ||
33
+ snippet.template.config.docs
34
+ }
35
+ className="snippet-viewer-footer__btn"
36
+ onClick={onCopy}
37
+ >
38
Docs <BookOpen size={14} />
39
</a>
40
)}
0 commit comments