Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix economy/overview rates displaying as dates #5269

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend-components/tables/src/components/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default function Table({
: columns[0];
const indexValue = indexLabel ? row[indexLabel] : null;
const value = row[column];
const only_numbers = value?.toString().replace(/[^0-9]/g, "") ?? "";
const only_numbers = value?.toString()?.split(".")?.pop()?.replace(/[^0-9]/g, "") ?? "";
const probablyDate =
only_numbers?.length >= 4 &&
(includesDateNames(column) ||
Expand Down Expand Up @@ -219,7 +219,7 @@ export default function Table({
const indexValue = indexLabel ? row.original[indexLabel] : null;
const value = row.original[column];
const valueType = typeof value;
const only_numbers = value?.toString().replace(/[^0-9]/g, "") ?? "";
const only_numbers = value?.toString()?.split(".")?.pop()?.replace(/[^0-9]/g, "") ?? "";
const probablyDate =
only_numbers?.length >= 4 &&
(includesDateNames(column) ||
Expand Down
Loading