import React, { useEffect, useState } from 'react'; import axios from 'axios'; import { Avatar, Card, Typography, Space, Link } from '@arco-design/web-react'; import useLocale from '../../utils/useLocale'; import styles from './style/index.module.less'; export default function LatestActivity() { const locale = useLocale(); const [projectList, setProjectList] = useState([]); function fetchProjectList() { axios.get('/api/user/latestProjectList').then((res) => { setProjectList(res.data || []); }); } useEffect(() => { fetchProjectList(); }, []); return (
{locale['userInfo.title.latestProject']} {locale['userInfo.showMore']}
{projectList.map((project) => (
{project.name} {project.description} {project.contributors.map((contributor, index) => ( ))}
))}
); }