fix(share): resolve typescript errors in ReaderView and ShareButton

This commit is contained in:
Michael committed 2026-02-13 09:02:31 +01:00
1 parent 8279df02d3
commit 02c3c333cf
2 files changed
+2 -3

No files matched your search

+1 -2
View File
@@ -1,6 +1,5 @@
import { ReaderViewProps } from './ReaderView'; // Self-reference import seems wrong, removing.
import { useState } from 'react';
import { ShareButton } from './ShareButton';
// No need to import ReaderViewProps if we define it here, but let's keep clean.
import { type Article, articlesApi } from '../api/articles';
interface ReaderViewProps {
+1 -1
View File
@@ -35,7 +35,7 @@ export function ShareButton({ article, className = "" }: ShareButtonProps) {
};
const copyToClipboard = () => {
navigator.clipboard.writeText(article.url);
navigator.clipboard.writeText(article.url || window.location.href);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
setIsOpen(false);