mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-11 17:28:05 +02:00
fix(share): resolve typescript errors in ReaderView and ShareButton
This commit is contained in:
1 parent
8279df02d3
commit
02c3c333cf
2 files changed
+2
-3
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user