Skip to content

Commit

Permalink
fix(ui): show filename in import-detail-modal header (#25)
Browse files Browse the repository at this point in the history
* fix(ui): show filename in import-detail-modal header

* fix(ui): show last element in splittedPath
  • Loading branch information
dvalleri authored Jun 25, 2024
1 parent 0be20d5 commit 99629c5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ function Header() {
const dataType = model?.dataType ? DataTypeEnumLabel[model.dataType] : '--';
const granularity = model?.granularity ? GranularityEnumLabel[model.granularity] : '--';

const fileName = data?.fileName ?? '';
const splittedPath = data?.path.split('/') ?? [];
const fileName = splittedPath.length > 0 ? splittedPath[splittedPath.length - 1] : '';

const updateTime = data?.date ?? '';
const subtitle = `updated at ${moment(updateTime).format('DD MMM YYYY HH:mm:ss').toString()}`;
Expand Down

0 comments on commit 99629c5

Please sign in to comment.