2022-09-29 21:15:25 -07:00
|
|
|
import { useTranslation } from "next-i18next";
|
2022-09-28 02:32:39 +03:00
|
|
|
import classNames from "classnames";
|
|
|
|
|
2022-08-25 16:29:26 +03:00
|
|
|
export default function Block({ value, label }) {
|
2022-09-29 21:15:25 -07:00
|
|
|
const { t } = useTranslation();
|
|
|
|
|
2022-08-25 16:29:26 +03:00
|
|
|
return (
|
2022-09-28 02:32:39 +03:00
|
|
|
<div
|
|
|
|
className={classNames(
|
2025-03-02 08:42:57 -08:00
|
|
|
"bg-theme-200/50 dark:bg-theme-900/20 rounded-sm m-1 flex-1 flex flex-col items-center justify-center text-center p-1",
|
2023-09-10 23:36:54 +02:00
|
|
|
value === undefined ? "animate-pulse" : "",
|
2023-10-17 23:26:55 -07:00
|
|
|
"service-block",
|
2022-09-28 02:32:39 +03:00
|
|
|
)}
|
|
|
|
>
|
2022-08-25 16:29:26 +03:00
|
|
|
<div className="font-thin text-sm">{value === undefined || value === null ? "-" : value}</div>
|
2022-09-29 21:15:25 -07:00
|
|
|
<div className="font-bold text-xs uppercase">{t(label)}</div>
|
2022-08-25 16:29:26 +03:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|