links-minor-fixes

This commit is contained in:
Untone 2024-07-04 00:35:34 +03:00
parent a2514735f9
commit b909f83411
2 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ export const ArticleCard = (props: ArticleCardProps) => {
const navigate = useNavigate() const navigate = useNavigate()
const scrollToComments = (event: MouseEvent & { currentTarget: HTMLAnchorElement; target: Element }) => { const scrollToComments = (event: MouseEvent & { currentTarget: HTMLAnchorElement; target: Element }) => {
event.preventDefault() event.preventDefault()
navigate(`/article/${props.article.slug}`) navigate(`/${props.article.slug}`)
changeSearchParams({ changeSearchParams({
scrollTo: 'comments' scrollTo: 'comments'
}) })

View File

@ -50,7 +50,7 @@ export const NotificationGroup = (props: NotificationGroupProps) => {
markSeenThread(threadId) markSeenThread(threadId)
const [slug, commentId] = threadId.split('::') const [slug, commentId] = threadId.split('::')
navigate(`/article/${slug}`) navigate(`/${slug}`)
if (commentId) changeSearchParams({ commentId }) if (commentId) changeSearchParams({ commentId })
} }