I want a scalable solution, using React, to list some pages and automatically using the last one as my main page.
I have my 'legals mention' page, which will be regularly updated with new content.
import { useTranslation } from "react-i18next";
function Legals() {
const { t } = useTranslation('common');
return (
<div>
<h1>Legals</h1>
<span>Version 2.1 - 4th revision</span>
<span>· Effective September 30, 2020</span>
<button>Archived versions</button>
{...}<Content>{...}
</div>
)}
export default Legals;
So this is supposed to display the most recent version, and contains a button with a list to older versions.
I was thinking of using i18n and check in a folder for the last version, is it the best way to do it?
How to accomplish it, at least in pseudocode?
question from:
https://stackoverflow.com/questions/66055454/listing-files-to-generate-dynamic-components-with-list 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…