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, credits and pico code on cerebellum.neuroinf.jp, keeping this site's item types, rankings and menus - port the MediaWiki pages to function components - serve all module data from modules/, redirecting the old download and /database/file URLs - tile the plate texture and keep form controls on white - track page views with GA4
40 lines
1.2 KiB
TypeScript
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;
|