Skip to content

Commit 50c414a

Browse files
authored
feat(LoadData): direct go/python/node clicks to onboarding page (#5098)
1 parent e92ebe6 commit 50c414a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/writeData/components/ClientLibrarySection.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ const ClientLibrarySection = () => {
2929
const history = useHistory()
3030
const org = useSelector(getOrg)
3131

32+
const onBoardingItems = {
33+
python: 'python',
34+
'javascript-node': 'nodejs',
35+
go: 'golang',
36+
}
37+
3238
if (!items.length) {
3339
return null
3440
}
@@ -56,7 +62,12 @@ const ClientLibrarySection = () => {
5662
{items.map(item => {
5763
const goto = () => {
5864
event('Load data client library clicked', {type: item.name})
59-
history.push(
65+
if (onBoardingItems.hasOwnProperty(`${item.id}`)) {
66+
return history.push(
67+
`/${ORGS}/${org.id}/new-user-setup/${onBoardingItems[item.id]}`
68+
)
69+
}
70+
return history.push(
6071
`/${ORGS}/${org.id}/load-data/${CLIENT_LIBS}/${item.id}`
6172
)
6273
}

0 commit comments

Comments
 (0)