diff options
Diffstat (limited to 'site')
| -rw-r--r-- | site/src/components/NewsFeed.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/site/src/components/NewsFeed.tsx b/site/src/components/NewsFeed.tsx index fe81148..62d4420 100644 --- a/site/src/components/NewsFeed.tsx +++ b/site/src/components/NewsFeed.tsx @@ -129,7 +129,8 @@ export const NewsFeed: React.FC<NewsFeedProps> = ({ newsItems }) => { href={`#${newsId}`} onClick={(e) => { e.preventDefault(); - const url = `${window.location.origin}${window.location.pathname}#${newsId}`; + const pathname = window.location.pathname === '/' ? '/news' : window.location.pathname.replace(/^\/game/, ''); + const url = `https://ac.moekyun.me${pathname}?post=${newsId}`; navigator.clipboard.writeText(url); alert("Copied Direct Link to Post (Older news are automatically culled after some time)"); }} |
