Skip to content
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
26 changes: 22 additions & 4 deletions src/apps/onboarding/src/pages/account-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import classNames from 'classnames'

import { Button, InputSelect, PageDivider } from '~/libs/ui'
import { getCountryLookup } from '~/libs/core/lib/profile/profile-functions/profile-store/profile-xhr.store'
import { EnvironmentConfig } from '~/config'
import { Member } from '~/apps/talent-search/src/lib/models'

import { ProgressBar } from '../../components/progress-bar'

Expand All @@ -30,6 +32,7 @@ const blankConnectInfo: ConnectInfo = emptyConnectInfo()
const PageAccountDetailsContent: FC<{
reduxAddress: MemberAddress | null
reduxConnectInfo: ConnectInfo | null
reduxMemberInfo: Member | null
updateMemberConnectInfos: (infos: ConnectInfo[]) => void
createMemberConnectInfos: (infos: ConnectInfo[]) => void
updateMemberHomeAddresss: (infos: MemberAddress[]) => void
Expand Down Expand Up @@ -133,7 +136,11 @@ const PageAccountDetailsContent: FC<{
&& !loadingAddress
&& !loadingConnectInfo
&& shouldNavigateTo.current) {
navigate(shouldNavigateTo.current)
if (shouldNavigateTo.current.startsWith('../')) {
navigate(shouldNavigateTo.current)
} else {
window.location.href = shouldNavigateTo.current
}
}
/* eslint-disable react-hooks/exhaustive-deps */
}, [loadingAddress, loadingConnectInfo])
Expand Down Expand Up @@ -313,8 +320,8 @@ const PageAccountDetailsContent: FC<{

<ProgressBar
className={styles.ProgressBar}
progress={6.0 / 7}
label='6/7'
progress={6.0 / 6}
label='6/6'
/>

<div className={classNames('d-flex justify-content-between', styles.blockFooter)}>
Expand All @@ -337,7 +344,16 @@ const PageAccountDetailsContent: FC<{
size='lg'
primary
iconToLeft
disabled={!_.isEmpty(formErrors)}
disabled={!_.isEmpty(formErrors) || !props.reduxMemberInfo}
onClick={() => {
if (loadingAddress || loadingConnectInfo) {
shouldNavigateTo.current
= `${EnvironmentConfig.USER_PROFILE_URL}/${props.reduxMemberInfo?.handle}`
} else {
window.location.href
= `${EnvironmentConfig.USER_PROFILE_URL}/${props.reduxMemberInfo?.handle}`
}
}}
>
next
</Button>
Expand All @@ -352,13 +368,15 @@ const mapStateToProps: any = (state: any) => {
loadingMemberInfo,
address,
connectInfo,
memberInfo,
}: any = state.member

return {
loadingMemberInfo,
loadingMemberTraits,
reduxAddress: address,
reduxConnectInfo: connectInfo,
reduxMemberInfo: memberInfo,
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/apps/onboarding/src/pages/educations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export const PageEducationsContent: FC<{

<ProgressBar
className={styles.ProgressBar}
progress={4.0 / 7}
label='4/7'
progress={4.0 / 6}
label='4/6'
/>

<div className={classNames('d-flex justify-content-between', styles.blockFooter)}>
Expand Down
4 changes: 2 additions & 2 deletions src/apps/onboarding/src/pages/personalization/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ const PagePersonalizationContent: FC<{

<ProgressBar
className={styles.ProgressBar}
progress={5.0 / 7}
label='5/7'
progress={5.0 / 6}
label='5/6'
/>

<div className={classNames('d-flex justify-content-between', styles.blockFooter)}>
Expand Down
4 changes: 2 additions & 2 deletions src/apps/onboarding/src/pages/skills/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const PageSkills: FC<{}> = () => {

<ProgressBar
className={styles.ProgressBar}
progress={2.0 / 7}
label='2/7'
progress={2.0 / 6}
label='2/6'
/>

<div className={classNames('d-flex justify-content-between', styles.blockFooter)}>
Expand Down
4 changes: 2 additions & 2 deletions src/apps/onboarding/src/pages/start/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export const PageStart: FC<{}> = () => {

<ProgressBar
className={styles.ProgressBar}
progress={1.0 / 7}
label='1/7'
progress={1.0 / 6}
label='1/6'
/>

<div className={classNames('d-flex justify-content-end', styles.blockFooter)}>
Expand Down
4 changes: 2 additions & 2 deletions src/apps/onboarding/src/pages/works/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ export const PageWorksContent: FC<{

<ProgressBar
className={styles.ProgressBar}
progress={3.0 / 7}
label='3/7'
progress={3.0 / 6}
label='3/6'
/>

<div className={classNames('d-flex justify-content-between', styles.blockFooter)}>
Expand Down
1 change: 1 addition & 0 deletions src/config/environments/default.env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const TC_DOMAIN: string = get({

export const TOPCODER_URL: string = `https://www.${TC_DOMAIN}`
export const PLATFORMUI_URL: string = `https://platform-ui.${TC_DOMAIN}`
export const USER_PROFILE_URL: string = `https://profiles.${TC_DOMAIN}`

export const API = {
V1: `https://api.${TC_DOMAIN}/v1`,
Expand Down
1 change: 1 addition & 0 deletions src/config/environments/global-config.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export interface GlobalConfig {
TC_DOMAIN: string
TOPCODER_URL: string
PLATFORMUI_URL: string
USER_PROFILE_URL: string
API: {
V1: string
V3: string
Expand Down