[feature/frontend] update person info
Some checks failed
Build Backend / Build Docker Image (push) Failing after 2m24s
Test Backend / test (push) Successful in 2m58s

This commit is contained in:
CDN 2025-02-21 20:04:30 +08:00
parent 79912925db
commit 7a33038af8
Signed by: CDN
GPG key ID: 0C656827F9F80080
21 changed files with 1436 additions and 217 deletions

View file

@ -1,6 +1,7 @@
import { useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { useState, useEffect } from 'react';
import LoadingSpinner from '../components/LoadingSpinner';
export default function Article() {
const { articleId } = useParams();
@ -9,13 +10,19 @@ export default function Article() {
content: string;
metadata: any;
} | null>(null);
const [loading, setLoading] = useState(true);
useEffect(() => {
// In a real application, we would fetch the article content here
// based on the articleId and current language
console.log(`Fetching article ${articleId} in ${i18n.language}`);
setLoading(false);
}, [articleId, i18n.language]);
if (loading) {
return <LoadingSpinner />;
}
if (!article) {
return <div>Loading...</div>;
}