Allow widget field visibility to be configurable

This commit is contained in:
Jason Fischer 2022-09-29 21:15:25 -07:00
parent 756f6310af
commit 9b7d6b196f
No known key found for this signature in database
30 changed files with 246 additions and 219 deletions

View file

@ -17,19 +17,19 @@ export default function Component({ service }) {
if (!statsData) {
return (
<Container>
<Block label={t("mastodon.user_count")} />
<Block label={t("mastodon.status_count")} />
<Block label={t("mastodon.domain_count")} />
<Container service={service}>
<Block label="mastodon.user_count" />
<Block label="mastodon.status_count" />
<Block label="mastodon.domain_count" />
</Container>
);
}
return (
<Container>
<Block label={t("mastodon.user_count")} value={t("common.number", { value: statsData.stats.user_count })} />
<Block label={t("mastodon.status_count")} value={t("common.number", { value: statsData.stats.status_count })} />
<Block label={t("mastodon.domain_count")} value={t("common.number", { value: statsData.stats.domain_count })} />
<Container service={service}>
<Block label="mastodon.user_count" value={t("common.number", { value: statsData.stats.user_count })} />
<Block label="mastodon.status_count" value={t("common.number", { value: statsData.stats.status_count })} />
<Block label="mastodon.domain_count" value={t("common.number", { value: statsData.stats.domain_count })} />
</Container>
);
}