From fdbf92c95c5355136c38e958f6add37a8d242aa7 Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Tue, 1 Jul 2025 00:03:34 -0700
Subject: adjust post link to use middleware site

---
 site/src/components/NewsFeed.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'site/src/components/NewsFeed.tsx')

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)");
                 }}
-- 
cgit v1.2.3

