mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Added useFormat hook to format special values.
This commit is contained in:
parent
a71cf675ae
commit
2eee9c23c3
9 changed files with 68 additions and 19 deletions
|
|
@ -25,7 +25,7 @@ export function flattenJSON(
|
|||
).keyValues;
|
||||
}
|
||||
|
||||
export function getDynamicDataType(value: any): string {
|
||||
export function getDataType(value: any): string {
|
||||
let type: string = typeof value;
|
||||
|
||||
if ((type === 'string' && isValid(value)) || isValid(parseISO(value))) {
|
||||
|
|
@ -36,7 +36,7 @@ export function getDynamicDataType(value: any): string {
|
|||
}
|
||||
|
||||
function createKey(key, value, acc: { keyValues: any[]; parentKey: string }) {
|
||||
const type = getDynamicDataType(value);
|
||||
const type = getDataType(value);
|
||||
|
||||
let dynamicDataType = null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue