このコミットが含まれているのは:
2026-02-03 12:40:20 +09:00
コミット e0446e35ff
6個のファイルの変更36行の追加30行の削除
+2 -2
ファイルの表示
@@ -10,9 +10,9 @@ import axios from 'axios'
import toCamel from 'camelcase-keys'
import { AnimatePresence, motion } from 'framer-motion'
import { useEffect, useRef, useState } from 'react'
import { Link } from 'react-router-dom'
import DraggableDroppableTagRow from '@/components/DraggableDroppableTagRow'
import PrefetchLink from '@/components/PrefetchLink'
import TagLink from '@/components/TagLink'
import TagSearch from '@/components/TagSearch'
import SectionTitle from '@/components/common/SectionTitle'
@@ -389,7 +389,7 @@ export default (({ post }: Props) => {
</>)}
</li>
<li>
<Link to={`/posts/changes?id=${ post.id }`}></Link>
<PrefetchLink to={`/posts/changes?id=${ post.id }`}></PrefetchLink>
</li>
</ul>
</div>)}
+12 -9
ファイルの表示
@@ -1,6 +1,5 @@
import axios from 'axios'
import { useEffect, useState } from 'react'
import { Link } from 'react-router-dom'
import PrefetchLink from '@/components/PrefetchLink'
import { API_BASE_URL } from '@/config'
@@ -18,10 +17,14 @@ type CommonProps = { tag: Tag
prefetch?: boolean }
type PropsWithLink =
CommonProps & { linkFlg?: true } & Partial<ComponentProps<typeof Link>>
& CommonProps
& { linkFlg?: true }
& Partial<ComponentProps<typeof PrefetchLink>>
type PropsWithoutLink =
CommonProps & { linkFlg: false } & Partial<HTMLAttributes<HTMLSpanElement>>
& CommonProps
& { linkFlg: false }
& Partial<HTMLAttributes<HTMLSpanElement>>
type Props = PropsWithLink | PropsWithoutLink
@@ -76,17 +79,17 @@ export default (({ tag,
<span className="mr-1">
{havingWiki
? (
<Link to={`/wiki/${ encodeURIComponent (tag.name) }`}
<PrefetchLink to={`/wiki/${ encodeURIComponent (tag.name) }`}
className={linkClass}>
?
</Link>)
</PrefetchLink>)
: (
<Link to={`/wiki/${ encodeURIComponent (tag.name) }`}
<PrefetchLink to={`/wiki/${ encodeURIComponent (tag.name) }`}
className="animate-[wiki-blink_.25s_steps(2,end)_infinite]
dark:animate-[wiki-blink-dark_.25s_steps(2,end)_infinite]"
title={`${ tag.name } Wiki が存在しません.`}>
!
</Link>)}
</PrefetchLink>)}
</span>)}
{nestLevel > 0 && (
<span
@@ -110,12 +113,12 @@ export default (({ tag,
{...props}>
{tag.name}
</PrefetchLink>
: <Link
: <PrefetchLink
to={`/posts?${ (new URLSearchParams ({ tags: tag.name })).toString () }`}
className={linkClass}
{...props}>
{tag.name}
</Link>)
</PrefetchLink>)
: (
<span className={spanClass}
{...props}>
+3 -4
ファイルの表示
@@ -1,6 +1,5 @@
import { Link } from 'react-router-dom'
import Separator from '@/components/MenuSeparator'
import PrefetchLink from '@/components/PrefetchLink'
import { cn } from '@/lib/utils'
import type { FC } from 'react'
@@ -24,9 +23,9 @@ export default (({ user, sp }: Props) => {
return (
<>
{sp && <Separator/>}
<Link to="/users/settings"
<PrefetchLink to="/users/settings"
className={className}>
{user.name || '名もなきニジラー'}
</Link>
</PrefetchLink>
</>)
}) satisfies FC<Props>
+2 -2
ファイルの表示
@@ -2,9 +2,9 @@ import axios from 'axios'
import toCamel from 'camelcase-keys'
import { useEffect, useMemo, useState } from 'react'
import ReactMarkdown from 'react-markdown'
import { Link } from 'react-router-dom'
import remarkGFM from 'remark-gfm'
import PrefetchLink from '@/components/PrefetchLink'
import SectionTitle from '@/components/common/SectionTitle'
import SubsectionTitle from '@/components/common/SubsectionTitle'
import { API_BASE_URL } from '@/config'
@@ -24,7 +24,7 @@ const mdComponents = { h1: ({ children }) => <SectionTitle>{children}</SectionT
ul: ({ children }) => <ul className="list-disc pl-6">{children}</ul>,
a: (({ href, children }) => (
['/', '.'].some (e => href?.startsWith (e))
? <Link to={href!}>{children}</Link>
? <PrefetchLink to={href!}>{children}</PrefetchLink>
: (
<a href={href}
target="_blank"