Skip to content

Commit 9fac945

Browse files
Merge pull request #992 from topcoder-platform/PM-505
PM-505 Fix default values on onboarding form
2 parents 3d527f1 + 2dc5180 commit 9fac945

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/apps/onboarding/src/components/InputTextAutoSave/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface InputTextProps {
2828
}
2929

3030
const InputTextAutoSave: FC<InputTextProps> = (props: InputTextProps) => {
31-
const [value, setValue] = useState<InputValue>('')
31+
const [value, setValue] = useState<InputValue>(props.value || '')
3232
useEffect(() => {
3333
setValue(props.value)
3434
}, [props.value])

src/apps/onboarding/src/pages/open-to-work/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { useNavigate } from 'react-router-dom'
22
import { FC, MutableRefObject, useEffect, useRef, useState } from 'react'
33
import { connect } from 'react-redux'
4-
import { pick } from 'lodash'
54
import classNames from 'classnames'
65

76
import { Button, IconOutline, PageDivider } from '~/libs/ui'
@@ -104,7 +103,9 @@ export const PageOpenToWorkContent: FC<PageOpenToWorkContentProps> = props => {
104103
)
105104
}
106105

107-
const mapStateToProps: any = (state: any) => pick(state.member, 'availableForGigs')
106+
const mapStateToProps: any = (state: any) => ({
107+
availableForGigs: state.member.memberInfo?.availableForGigs,
108+
})
108109

109110
const mapDispatchToProps: any = {
110111
updateMemberOpenForWork,

0 commit comments

Comments
 (0)