The CRA toolchain was several major versions behind and no longer maintained, so the whole build, lint and runtime stack is replaced. - replace react-scripts with Vite 8 and TypeScript 7 - upgrade to React 19 and react-router 8 - swap unmaintained libraries: react-html-parser, axios, react-ga, react-image-lightbox, react-helmet, moment, react-spinner-material - replace ESLint with Biome for linting and formatting - switch the package manager from yarn to npm - serve static-contents/ with sirv in dev and copy it into the bundle - keep a withRouter shim so the class components can stay as they are for now
51 lines
1.8 KiB
TypeScript
51 lines
1.8 KiB
TypeScript
import type { MultiLang } from '../config';
|
|
import CreditsMenu from '../credits/block/CreditsMenu';
|
|
import IndexTree from '../database/blocks/IndexTree';
|
|
import Search from '../database/blocks/Search';
|
|
import Functions from '../functions';
|
|
import SelectLang from './blocks/SelectLang';
|
|
|
|
interface Props {
|
|
lang: MultiLang;
|
|
}
|
|
|
|
const LeftColumn = (props: Props) => {
|
|
const { lang } = props;
|
|
const titles = {
|
|
selectLang: Functions.mlang('[en]Select Language[/en][ja]言語選択[/ja]', lang),
|
|
indexTree: Functions.mlang('[en]Index Tree[/en][ja]インデックスツリー[/ja]', lang),
|
|
search: Functions.mlang('[en]Search[/en][ja]検索[/ja]', lang),
|
|
siteInfo: Functions.mlang('[en]Site Information[/en][ja]サイト情報[/ja]', lang),
|
|
};
|
|
return (
|
|
<div className="leftcolumn">
|
|
<div className="block">
|
|
<div className="blockTitle">{titles.selectLang}</div>
|
|
<div className="blockContent">
|
|
<SelectLang lang={lang} />
|
|
</div>
|
|
</div>
|
|
<div className="block">
|
|
<div className="blockTitle">{titles.search}</div>
|
|
<div className="blockContent">
|
|
<Search lang={lang} />
|
|
</div>
|
|
</div>
|
|
<div className="block">
|
|
<div className="blockTitle">{titles.indexTree}</div>
|
|
<div className="blockContent">
|
|
<IndexTree lang={lang} />
|
|
</div>
|
|
</div>
|
|
<div className="block">
|
|
<div className="blockTitle">{titles.siteInfo}</div>
|
|
<div className="blockContent">
|
|
<CreditsMenu lang={lang} />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default LeftColumn;
|