Skip to content

Commit ad1de88

Browse files
committed
fix: only show View Markdown button for .md source files
1 parent 7308c87 commit ad1de88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_components/ViewMarkdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default function ViewMarkdown({ file }: { file: string | undefined }) {
2-
if (!file) return null;
2+
if (!file || !file.endsWith(".md")) return null;
33

44
return (
55
<a class="btn" target="_blank" href={file}>

0 commit comments

Comments
 (0)