Files
open.neuroinf.jp/src/database/DatabaseTop.tsx
T
orrisroot e93014bcea feat: migrate from Create React App to Vite
Rebuild the site on the stack the other converted sites share: Vite 8,
React 19, TypeScript 7, react-router 8, Biome and sanitize.css, with the
site data moved out of the bundle into static-contents/.

- base the database and pico code on the other converted sites,
  keeping this site's layout, pages and item fields
- read file timestamps as Unix seconds in the file and license views
- serve all module data from modules/, redirecting the old download and
  /database/file URLs
- keep form controls on white
- track page views with GA4
2026-09-14 17:38:48 +09:00

40 lines
1.2 KiB
TypeScript

import Config, { type MultiLang } from '../config';
import styles from './DatabaseTop.module.css';
import ItemType from './item-type';
interface Props {
lang: MultiLang;
}
const DatabaseTop = (props: Props) => {
const { lang } = props;
const types: string[][] = [];
const len = Config.XOONIPS_ITEMTYPES.length;
for (let i = 0; i < Math.ceil(len / 2); i++) {
const j = i * 2;
const p = Config.XOONIPS_ITEMTYPES.slice(j, j + 2);
types.push(p);
}
return (
<table className={styles.itemTypes}>
<tbody>
{types.map((value) => {
return (
<tr key={value.join('-')}>
{value.map((type) => {
return (
<td key={type} className={styles.itemType}>
{type !== '' && <ItemType.Top lang={lang} type={`xnp${type}`} />}
</td>
);
})}
</tr>
);
})}
</tbody>
</table>
);
};
export default DatabaseTop;