このコミットが含まれているのは:
@@ -2,6 +2,7 @@ import { useEffect, useState } from 'react'
|
||||
import { Helmet } from 'react-helmet-async'
|
||||
|
||||
import { useLocale } from '@/lib/useLocale'
|
||||
import { useUITranslation } from '@/lib/useUITranslation'
|
||||
import PrefetchLink from '@/components/PrefetchLink'
|
||||
import FormField from '@/components/common/FormField'
|
||||
import PageTitle from '@/components/common/PageTitle'
|
||||
@@ -16,6 +17,7 @@ import type { WikiPage } from '@/types'
|
||||
|
||||
|
||||
const WikiSearchPage: FC = () => {
|
||||
const { label } = useUITranslation ('shared')
|
||||
const locale = useLocale ()
|
||||
const [title, setTitle] = useState ('')
|
||||
const [text, setText] = useState ('')
|
||||
@@ -46,7 +48,7 @@ const WikiSearchPage: FC = () => {
|
||||
<PageTitle>Wiki</PageTitle>
|
||||
<form onSubmit={handleSearch} className="space-y-2">
|
||||
{/* タイトル */}
|
||||
<FormField label="タイトル">
|
||||
<FormField label={label ('labels.title')}>
|
||||
{({ invalid }) => (
|
||||
<input type="text"
|
||||
value={title}
|
||||
@@ -55,7 +57,7 @@ const WikiSearchPage: FC = () => {
|
||||
</FormField>
|
||||
|
||||
{/* 内容 */}
|
||||
<FormField label="内容">
|
||||
<FormField label={label ('labels.content')}>
|
||||
{({ invalid }) => (
|
||||
<input type="text"
|
||||
value={text}
|
||||
@@ -67,7 +69,7 @@ const WikiSearchPage: FC = () => {
|
||||
<div className="py-3">
|
||||
<button type="submit"
|
||||
className="bg-blue-500 text-white px-4 py-2 rounded">
|
||||
検索
|
||||
{label ('common:search')}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -77,8 +79,8 @@ const WikiSearchPage: FC = () => {
|
||||
<table className="table-auto w-full border-collapse">
|
||||
<thead className="border-b-2 border-black dark:border-white">
|
||||
<tr>
|
||||
<th className="p-2 text-left">タイトル</th>
|
||||
<th className="p-2 text-left">最終更新</th>
|
||||
<th className="p-2 text-left">{label ('labels.title')}</th>
|
||||
<th className="p-2 text-left">{label ('labels.lastUpdated')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -89,7 +91,7 @@ const WikiSearchPage: FC = () => {
|
||||
<PrefetchLink to={`/wiki/${ encodeURIComponent (page.title) }`}>
|
||||
{page.title}
|
||||
</PrefetchLink>
|
||||
{page.deprecatedAt != null && <span>(廃止)</span>}
|
||||
{page.deprecatedAt != null && label ('labels.deprecatedSuffix')}
|
||||
</td>
|
||||
<td className="p-2">
|
||||
{dateString (page.updatedAt)}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする