mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-04 06:23:40 +01:00
code styling
This commit is contained in:
parent
d6f53ab1e9
commit
02027deb06
@ -1,19 +1,19 @@
|
|||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
|
|
||||||
import Container from 'components/services/widget/container'
|
import Container from "components/services/widget/container";
|
||||||
import Block from 'components/services/widget/block'
|
import Block from "components/services/widget/block";
|
||||||
import useWidgetAPI from 'utils/proxy/use-widget-api'
|
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||||
|
|
||||||
export default function Component({ service }) {
|
export default function Component({ service }) {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation();
|
||||||
const { widget } = service
|
const { widget } = service;
|
||||||
const { data: pyloadData, error: pyloadError } = useWidgetAPI(
|
const { data: pyloadData, error: pyloadError } = useWidgetAPI(
|
||||||
widget,
|
widget,
|
||||||
'statusServer',
|
"statusServer",
|
||||||
)
|
);
|
||||||
|
|
||||||
if (pyloadError || !pyloadData) {
|
if (pyloadError || !pyloadData) {
|
||||||
return <Container error={t('widget.api_error')} />
|
return <Container error={t("widget.api_error")} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -23,5 +23,5 @@ export default function Component({ service }) {
|
|||||||
<Block label="pyload.queue" value={t("common.number", { value: pyloadData.queue })} />
|
<Block label="pyload.queue" value={t("common.number", { value: pyloadData.queue })} />
|
||||||
<Block label="pyload.total" value={t("common.number", { value: pyloadData.total })} />
|
<Block label="pyload.total" value={t("common.number", { value: pyloadData.total })} />
|
||||||
</Container>
|
</Container>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user