feat(ui): add people lists for game owners and community stats
Build, Test & Push Frontend / quality-check (push) Successful in 47s
Build, Test & Push Frontend / docker (push) Successful in 22s

This commit is contained in:
lobo committed 2026-10-06 13:19:58 +02:00
1 parent b213b067dc
commit 3aed243e35
22 files changed
+425 -12

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import {useState} from 'react';
import {useTranslation} from 'react-i18next';
import {Card} from '@/components/ui/card';
import PeopleList from './PeopleList.jsx';
import {fetchOwners} from '../../utils/people.js';
/** Who else owns this game: names of users who opted in, the rest as a count. */
export default function OwnersCard({appid}) {
const {t} = useTranslation();
const [count, setCount] = useState(null);
const load = async (page) => {
const result = await fetchOwners({appid, page});
if (result.ok && page === 0) setCount(result.data.listedTotal + result.data.privateCount);
return result;
};
return (
<Card className="gap-3 p-4">
{count > 0 && <p className="font-medium">{t('PEOPLE.OTHER_OWNERS', {count})}</p>}
<PeopleList load={load} showYou={false}/>
</Card>
);
}