|
|
@ -11,7 +11,6 @@ import {
|
|
|
|
FontAwesomeIconProps,
|
|
|
|
FontAwesomeIconProps,
|
|
|
|
} from "@fortawesome/react-fontawesome";
|
|
|
|
} from "@fortawesome/react-fontawesome";
|
|
|
|
import { isNull, isUndefined } from "lodash";
|
|
|
|
import { isNull, isUndefined } from "lodash";
|
|
|
|
import moment from "moment";
|
|
|
|
|
|
|
|
import React, { FunctionComponent, useMemo } from "react";
|
|
|
|
import React, { FunctionComponent, useMemo } from "react";
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
OverlayTrigger,
|
|
|
|
OverlayTrigger,
|
|
|
@ -98,22 +97,6 @@ export const LoadingIndicator: FunctionComponent<{
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
interface FormatterProps {
|
|
|
|
|
|
|
|
format?: string;
|
|
|
|
|
|
|
|
children: string | Date;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const DateFormatter: FunctionComponent<FormatterProps> = ({
|
|
|
|
|
|
|
|
children,
|
|
|
|
|
|
|
|
format,
|
|
|
|
|
|
|
|
}) => {
|
|
|
|
|
|
|
|
const result = useMemo(
|
|
|
|
|
|
|
|
() => moment(children, format ?? "DD/MM/YYYY h:mm:ss").fromNow(),
|
|
|
|
|
|
|
|
[children, format]
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
return <span>{result}</span>;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface LanguageTextProps {
|
|
|
|
interface LanguageTextProps {
|
|
|
|
text: Language;
|
|
|
|
text: Language;
|
|
|
|
className?: string;
|
|
|
|
className?: string;
|
|
|
|