このコミットが含まれているのは:
2026-10-18 01:09:31 +09:00
コミット 0c1f459d4e
13個のファイルの変更、133行の追加、89行の削除
+8 -6
ファイルの表示
@@ -30,17 +30,19 @@ const HelpDiffPage: FC = () => {
queryKey: helpKeys.article (identifier),
queryFn: () => getHelpArticle (identifier),
staleTime: Infinity })
const language = resolveHelpLanguage (article, localeLanguage (locale))
const requestedLanguage = localeLanguage (locale)
const language = resolveHelpLanguage (article, requestedLanguage)
const validParams = Boolean (identifier && from && to)
&& searchParams.getAll ('from').length === 1
&& searchParams.getAll ('to').length === 1
const { data: diff, isLoading, isError } = useQuery ({
enabled: validParams && article != null,
queryKey: helpKeys.diff (identifier, language, from, to),
queryFn: () => getHelpDiff (identifier, language, from, to),
enabled: validParams && language != null,
queryKey: helpKeys.diff (identifier, requestedLanguage, from, to),
queryFn: () => getHelpDiff (identifier, requestedLanguage, from, to),
staleTime: Infinity })
if (!(validParams) || isError || (!(isLoading) && diff == null))
if (!(validParams) || (article != null && language == null)
|| isError || (!(isLoading) && diff == null))
return <NotFound/>
const title = `${ diff?.to.title ?? identifier } (${ from } → ${ to })`
@@ -65,7 +67,7 @@ const HelpDiffPage: FC = () => {
{diff.to.title} ({to})
</PrefetchLink>
</div>
<pre lang={language} className="mt-4 overflow-x-auto whitespace-pre">
<pre lang={requestedLanguage} className="mt-4 overflow-x-auto whitespace-pre">
<code>
{diff.lines.map ((line, index) => {
const colour = cn (