mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-12-06 00:16:49 +00:00
Wrap intl in span identifying translation
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { intl } from "src/locale";
|
||||
import cn from "classnames";
|
||||
import { T } from "src/locale";
|
||||
|
||||
interface Props {
|
||||
enabled: boolean;
|
||||
}
|
||||
export function StatusFormatter({ enabled }: Props) {
|
||||
if (enabled) {
|
||||
return <span className="badge bg-lime-lt">{intl.formatMessage({ id: "online" })}</span>;
|
||||
}
|
||||
return <span className="badge bg-red-lt">{intl.formatMessage({ id: "offline" })}</span>;
|
||||
return (
|
||||
<span className={cn("badge", enabled ? "bg-lime-lt" : "bg-red-lt")}>
|
||||
<T id={enabled ? "online" : "offline"} />
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user