From 6c0ac7d59d6257a369c8db45d45aba745c162c11 Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 27 Nov 2024 14:42:48 +0100 Subject: [PATCH] fix: mod edit route --- src/pages/mod/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/mod/index.tsx b/src/pages/mod/index.tsx index e1746cf..da3cb91 100644 --- a/src/pages/mod/index.tsx +++ b/src/pages/mod/index.tsx @@ -15,7 +15,7 @@ import { toast } from 'react-toastify' import { BlogCard } from '../../components/BlogCard' import { ProfileSection } from '../../components/ProfileSection' import { useAppSelector, useBodyScrollDisable } from '../../hooks' -import { getGamePageRoute } from '../../routes' +import { getGamePageRoute, getModsEditPageRoute } from '../../routes' import '../../styles/comments.css' import '../../styles/downloads.css' import '../../styles/innerPage.css' @@ -185,6 +185,7 @@ export const ModPage = () => { } const Game = () => { + const { naddr } = useParams() const navigation = useNavigation() const { mod, isAddedToNSFW, isBlocked, isRepost } = useLoaderData() as ModPageLoaderResult @@ -245,6 +246,7 @@ const Game = () => { const game = mod?.game || '' const gameRoute = getGamePageRoute(game) + const editRoute = getModsEditPageRoute(naddr ? naddr : '') return ( <> @@ -281,7 +283,7 @@ const Game = () => { {userState.auth && userState.user?.pubkey === mod?.author && (