Few little fixes and tweaks
This commit is contained in:
parent
697725f2dc
commit
2f661239bc
@ -1,9 +1,22 @@
|
||||
interface DateViewProps{
|
||||
value : Date;
|
||||
import { getCurrentUser } from "../../modules/frame/services/authenticationService";
|
||||
|
||||
interface DateViewProps {
|
||||
value: Date;
|
||||
}
|
||||
|
||||
export function DateView( props: DateViewProps) : JSX.Element {
|
||||
const options : Intl.DateTimeFormatOptions = { year: '2-digit', month: 'short', day: 'numeric', hour12:true, hour:"2-digit", minute:"2-digit" };
|
||||
export function DateView(props: DateViewProps): JSX.Element {
|
||||
const options: Intl.DateTimeFormatOptions = {
|
||||
year: "2-digit",
|
||||
month: "short",
|
||||
day: "2-digit",
|
||||
hour12: false,
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
};
|
||||
|
||||
return <>{props.value.toLocaleString(undefined,options)}</>
|
||||
const currentuser = getCurrentUser();
|
||||
|
||||
return (
|
||||
<>{props.value.toLocaleString(currentuser?.preferredLocale, options)}</>
|
||||
);
|
||||
}
|
||||
@ -28,6 +28,7 @@ export const availableLocales = [
|
||||
|
||||
export const baseLocales = [
|
||||
"en",
|
||||
"es",
|
||||
"fr",
|
||||
"ur"
|
||||
] as const;
|
||||
@ -40,6 +41,7 @@ export const fallbackLng = {
|
||||
"en"
|
||||
],
|
||||
"es-ES": [
|
||||
"es",
|
||||
"en"
|
||||
],
|
||||
"fr-CA": [
|
||||
|
||||
@ -16,7 +16,7 @@ const ErrorLogs = (): JSX.Element => {
|
||||
data: [],
|
||||
});
|
||||
const [sortColumn, setSortColumn] = useState<Column<ErrorLog>>({
|
||||
key: "Id",
|
||||
key: "id",
|
||||
label: t("Id"),
|
||||
order: "desc",
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user