diff --git a/src/components/GameCard.tsx b/src/components/GameCard.tsx
index 1b34432..0d76af9 100644
--- a/src/components/GameCard.tsx
+++ b/src/components/GameCard.tsx
@@ -1,7 +1,7 @@
-import { useNavigate } from 'react-router-dom'
+import { Link } from 'react-router-dom'
+import { getGamePageRoute } from 'routes'
import '../styles/cardGames.css'
import { handleGameImageError } from '../utils'
-import { getGamePageRoute } from 'routes'
type GameCardProps = {
title: string
@@ -9,13 +9,10 @@ type GameCardProps = {
}
export const GameCard = ({ title, imageUrl }: GameCardProps) => {
- const navigate = useNavigate()
+ const route = getGamePageRoute(title)
return (
-
navigate(getGamePageRoute(title))}
- >
+
{
-
+
)
}
diff --git a/src/pages/mod/index.tsx b/src/pages/mod/index.tsx
index bcce8bd..ac1636f 100644
--- a/src/pages/mod/index.tsx
+++ b/src/pages/mod/index.tsx
@@ -5,7 +5,7 @@ import { formatDate } from 'date-fns'
import FsLightbox from 'fslightbox-react'
import { Filter, kinds, nip19, UnsignedEvent } from 'nostr-tools'
import { useEffect, useRef, useState } from 'react'
-import { useNavigate, useParams } from 'react-router-dom'
+import { Link as ReactRouterLink, useParams } from 'react-router-dom'
import { toast } from 'react-toastify'
import { BlogCard } from '../../components/BlogCard'
import { LoadingSpinner } from '../../components/LoadingSpinner'
@@ -16,7 +16,7 @@ import {
UserRelaysType
} from '../../controllers'
import { useAppSelector, useDidMount } from '../../hooks'
-import { getModsEditPageRoute } from '../../routes'
+import { getGamePageRoute, getModsEditPageRoute } from '../../routes'
import '../../styles/comments.css'
import '../../styles/downloads.css'
import '../../styles/innerPage.css'
@@ -41,9 +41,9 @@ import {
sendDMUsingRandomKey,
signAndPublish
} from '../../utils'
+import { Comments } from './internal/comment'
import { Reactions } from './internal/reactions'
import { Zap } from './internal/zap'
-import { Comments } from './internal/comment'
export const ModPage = () => {
const { naddr } = useParams()
@@ -214,7 +214,6 @@ type GameProps = {
}
const Game = ({ naddr, game, author, aTag }: GameProps) => {
- const navigate = useNavigate()
const userState = useAppSelector((state) => state.user)
const [isLoading, setIsLoading] = useState(false)
const [loadingSpinnerDesc, setLoadingSpinnerDesc] = useState('')
@@ -510,15 +509,18 @@ const Game = ({ naddr, game, author, aTag }: GameProps) => {
userState.user?.npub &&
userState.user.npub === import.meta.env.VITE_REPORTING_NPUB
+ const gameRoute = getGamePageRoute(game)
+ const editRoute = getModsEditPageRoute(naddr)
+
return (
<>
{isLoading &&
}