Skip to content

Commit c768386

Browse files
authored
[CTM-50] Clarify URL on data import (#5459)
1 parent 4da5962 commit c768386

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/import-data/ImportDataOverview.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,25 @@ export interface ImportDataOverviewProps {
4747
export const ImportDataOverview = (props: ImportDataOverviewProps): ReactNode => {
4848
const { importRequest } = props;
4949

50+
const getDisplayUrl = (url: string) => url.replace(/^https?:\/\//, '').split('?')[0];
51+
5052
return div({ style: styles.card }, [
5153
h2({ style: styles.title }, [getTitleForImportRequest(importRequest)]),
5254
'url' in importRequest &&
5355
h(Fragment, [
54-
h3({ style: { fontSize: 16 } }, ['Dataset source:']),
55-
div({ style: { marginTop: '1rem' } }, [`${importRequest.url.href.split('?')[0]}`]),
56+
h3({ style: { fontSize: 16, marginBottom: 2 } }, ['Dataset source:']),
57+
div(
58+
{
59+
style: {
60+
fontSize: 13,
61+
color: colors.dark(0.7),
62+
marginBottom: 8,
63+
marginTop: 0,
64+
},
65+
},
66+
['(For reference only — not a direct link)']
67+
),
68+
div({ style: { marginTop: '1rem', marginBottom: '0.5rem' } }, [getDisplayUrl(importRequest.url.href)]),
5669
]),
5770
h(ImportRequirements, { importRequest }),
5871
]);

0 commit comments

Comments
 (0)