You've already forked nginx-proxy-manager
mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-02 16:53:15 +03:00
Certificates react work
- renewal and download - table columns rendering - searching - deleting
This commit is contained in:
15
frontend/src/components/Table/Formatter/DateFormatter.tsx
Normal file
15
frontend/src/components/Table/Formatter/DateFormatter.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import cn from "classnames";
|
||||
import { isPast, parseISO } from "date-fns";
|
||||
import { DateTimeFormat } from "src/locale";
|
||||
|
||||
interface Props {
|
||||
value: string;
|
||||
highlightPast?: boolean;
|
||||
}
|
||||
export function DateFormatter({ value, highlightPast }: Props) {
|
||||
const dateIsPast = isPast(parseISO(value));
|
||||
const cl = cn({
|
||||
"text-danger": highlightPast && dateIsPast,
|
||||
});
|
||||
return <span className={cl}>{DateTimeFormat(value)}</span>;
|
||||
}
|
||||
Reference in New Issue
Block a user