Files
pupil.brain.riken.jp/src/common/CenterColumn.tsx
T
orrisroot c94d272342 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 code on cerebellum.neuroinf.jp and keep the pupil
  platform's table layout, about page and menu
- load the Flickr badge feed as JSONP without extra libraries
- serve the XooNIps data from modules/xoonips/, redirecting the old
  download and /database/file URLs
- restate the column widths as border-box totals and keep form controls
  on white
- track page views with GA4
2026-09-14 17:14:32 +09:00

61 lines
1.8 KiB
TypeScript

import { Link, Route, Routes } from 'react-router';
import type { MultiLang } from '../config';
import DatabaseTop from '../database/DatabaseTop';
import styles from './CenterColumn.module.css';
import MainContent from './MainContent';
interface Props {
lang: MultiLang;
}
const BreadCrumbs = () => {
return (
<div className={styles.breadclumbs}>
<Link to="/">Home</Link>
<Routes>
<Route path="/database/*" element={<>&nbsp;&raquo;&nbsp;Database</>} />
<Route path="/about" element={<>&nbsp;&raquo;&nbsp;About</>} />
<Route path="*" element={null} />
</Routes>
</div>
);
};
const CenterBlocks = (props: Props) => {
const { lang } = props;
return (
<table className={styles.centerBlocks}>
<tbody>
<tr>
<td colSpan={2}>
<h2 className={styles.centerMainTitle}>Registered Itemtypes</h2>
<div className={styles.centerMainContent}>
<DatabaseTop lang={lang} />
</div>
</td>
</tr>
<tr>
<td className={styles.centerLeftColumn}></td>
<td className={styles.centerRightColumn}></td>
</tr>
</tbody>
</table>
);
};
const CenterColumn = (props: Props) => {
const { lang } = props;
return (
<td className={styles.centerColumn}>
<BreadCrumbs />
<Routes>
<Route path="/" element={<CenterBlocks lang={lang} />} />
<Route path="*" element={null} />
</Routes>
<MainContent lang={lang} />
</td>
);
};
export default CenterColumn;