mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-07 00:14:25 +00:00
Fix type-check issues
This commit is contained in:
@@ -55,7 +55,9 @@ const MarkdownPreview: React.FC<MarkdownPreviewProps> = ({
|
||||
const [filePath] = decodeURIComponent(
|
||||
href.replace(`${baseUrl}/internal/`, '')
|
||||
).split('#');
|
||||
handleFileSelect(filePath);
|
||||
if (filePath) {
|
||||
handleFileSelect(filePath);
|
||||
}
|
||||
} else if (href.startsWith(`${baseUrl}/notfound/`)) {
|
||||
// For non-existent files, show a notification
|
||||
const fileName = decodeURIComponent(
|
||||
@@ -105,9 +107,6 @@ const MarkdownPreview: React.FC<MarkdownPreviewProps> = ({
|
||||
</a>
|
||||
),
|
||||
code: ({ children, className, ...props }: MarkdownCodeProps) => {
|
||||
const language = className
|
||||
? className.replace('language-', '')
|
||||
: null;
|
||||
return (
|
||||
<pre className={className}>
|
||||
<code {...props}>{children}</code>
|
||||
|
||||
Reference in New Issue
Block a user