Public Access
feat(ui): add people lists for game owners and community stats
This commit is contained in:
1 parent
b213b067dc
commit
3aed243e35
22 files changed
+425
-12
No files matched your search
@@ -28,11 +28,12 @@ function useCountUp(target, durationMs = 1600) {
|
||||
|
||||
/**
|
||||
* @param drill `{params}` of StatCount: the card is a button that opens the games behind the number
|
||||
* @param onClick used when there is no drill target
|
||||
*/
|
||||
export default function StatCard({label, value, icon: Icon, suffix, drill}) {
|
||||
export default function StatCard({label, value, icon: Icon, suffix, drill, onClick}) {
|
||||
const {i18n} = useTranslation();
|
||||
const animated = useCountUp(value);
|
||||
const target = useDrillTarget({title: label, count: value, ...drill});
|
||||
const target = useDrillTarget({title: label, count: value, ...drill}) ?? (onClick && {onClick});
|
||||
const card = (
|
||||
<Card className="gap-3 p-5">
|
||||
{Icon && (
|
||||
|
||||
Reference in new issue
Block a user