diff --git a/web-next/app/[locale]/forum/topic/[topicId]/page.tsx b/web-next/app/[locale]/forum/topic/[topicId]/page.tsx index e7dbcfe..57a79d4 100644 --- a/web-next/app/[locale]/forum/topic/[topicId]/page.tsx +++ b/web-next/app/[locale]/forum/topic/[topicId]/page.tsx @@ -17,6 +17,7 @@ import { Pagination } from '@/components/Pagination' import { ReplyForm } from '@/components/ReplyForm' import { EditPostForm } from '@/components/EditPostForm' import { ForumModActions } from '@/components/ForumModActions' +import { WowheadRefresh } from '@/components/WowheadRefresh' export const dynamic = 'force-dynamic' @@ -66,6 +67,7 @@ export default async function TopicPage({ } >
+ {path && ( { + let tries = 0 + let timer: ReturnType + const run = () => { + const wp = (window as unknown as { $WowheadPower?: { refreshLinks?: () => void } }).$WowheadPower + if (wp?.refreshLinks) { + wp.refreshLinks() + return + } + if (tries++ < 25) timer = setTimeout(run, 150) + } + run() + return () => clearTimeout(timer) + }, [dep]) + return null +}