Skip to content

Commit 56d88eb

Browse files
committed
Merge branch 'dev' into profiles-app
2 parents 38ab51a + 3ca9666 commit 56d88eb

File tree

41 files changed

+682
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+682
-219
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,10 @@ const FieldAvatar: FC<FieldAvatarProps> = (props: FieldAvatarProps) => {
108108
>
109109
{imgUrl ? (
110110
<img className={styles.img} src={imgUrl} alt='avatar' />
111-
) : (
111+
) : undefined}
112+
{!imgUrl ? (
112113
<img className={styles.imgPlaceholder} src={AvatarPlaceholder} alt='avatar' />
113-
)}
114+
) : undefined}
114115
</div>
115116
<div className='d-flex flex-column align-items-start'>
116117
<span className='color-black-60'>

src/apps/onboarding/src/components/modal-add-work/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ const ModalAddWork: FC<ModalAddWorkProps> = (props: ModalAddWorkProps) => {
172172
dirty
173173
/>
174174
</div>
175-
<div className='d-flex gap-16 full-width'>
175+
<div className='d-flex gap-16 full-width flex-wrap'>
176176
<div
177177
className='flex-1'
178178
>

src/apps/onboarding/src/components/modal-upload-photo/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ const ModalUploadPhoto: FC<ModalUploadPhotoProps> = (props: ModalUploadPhotoProp
5353

5454
setIsSaving(true)
5555
try {
56-
await updateMemberPhotoAsync(props.memberInfo.handle, formData)
57-
props.setMemberPhotoUrl(URL.createObjectURL(myFiles[0]))
56+
const result = await updateMemberPhotoAsync(props.memberInfo.handle, formData)
57+
props.setMemberPhotoUrl(result?.photoURL || URL.createObjectURL(myFiles[0]))
5858
setMyFiles([])
5959
props.onClose?.()
6060
} catch (error) {

src/apps/onboarding/src/components/onboarding-base-modal/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const OnboardingBaseModal: FC<OnboardingBaseModalProps> = (props: OnboardingBase
2020
size='body'
2121
title={props.title}
2222
classNames={{ modal: styles.infoModal }}
23-
blockScroll
2423
>
2524
{props.children}
2625
</BaseModal>

src/apps/onboarding/src/pages/onboarding/index.tsx

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,23 @@ import '../../styles/global/_index.scss'
1414

1515
import styles from './styles.module.scss'
1616

17-
const OnboardingContent: FC<{
17+
const OnboardingFooterContent: FC<{
1818
fetchMemberInfo: () => void
1919
fetchMemberTraits: () => void
2020
reduxMemberInfo: Member | undefined
2121
}> = props => {
22-
const { getChildRoutes }: RouterContextData = useContext(routerContext)
2322
useEffect(() => {
2423
props.fetchMemberInfo()
2524
props.fetchMemberTraits()
2625
/* eslint-disable react-hooks/exhaustive-deps */
2726
}, [])
2827

2928
return (
30-
<>
31-
<div className={classNames('d-flex flex-column', styles.container)}>
32-
<Outlet />
33-
<Routes>
34-
{getChildRoutes(onboardRouteId)}
35-
</Routes>
36-
<div id='calendar-portal' />
37-
</div>
38-
<span className={styles.textFooter}>
39-
I will complete this onboarding later,
40-
<a href={`${EnvironmentConfig.USER_PROFILE_URL}/${props.reduxMemberInfo?.handle}`}> skip for now</a>
41-
.
42-
</span>
43-
</>
29+
<span className={styles.textFooter}>
30+
I will complete this onboarding later,
31+
<a href={`${EnvironmentConfig.USER_PROFILE_URL}/${props.reduxMemberInfo?.handle}`}> skip for now</a>
32+
.
33+
</span>
4434
)
4535
}
4636

@@ -58,12 +48,30 @@ const mapDispatchToProps: any = {
5848
fetchMemberInfo,
5949
fetchMemberTraits,
6050
}
61-
const Onboarding: any = connect(mapStateToProps, mapDispatchToProps)(OnboardingContent)
51+
const OnboardingFooter: any = connect(mapStateToProps, mapDispatchToProps)(OnboardingFooterContent)
52+
53+
const OnboardingContent: FC<{
54+
}> = () => {
55+
const { getChildRoutes }: RouterContextData = useContext(routerContext)
56+
57+
return (
58+
<>
59+
<div className={classNames('d-flex flex-column', styles.container)}>
60+
<Outlet />
61+
<Routes>
62+
{getChildRoutes(onboardRouteId)}
63+
</Routes>
64+
<div id='calendar-portal' />
65+
</div>
66+
<OnboardingFooter />
67+
</>
68+
)
69+
}
6270

6371
export const OnboardingWrapper: FC<{}> = () => (
6472
<div className={classNames(styles.blockWrapper, 'd-flex flex-column align-items-center')}>
6573
<Provider store={store}>
66-
<Onboarding />
74+
<OnboardingContent />
6775
</Provider>
6876
</div>
6977
)

src/apps/onboarding/src/redux/reducers/member.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import _ from 'lodash'
22

3+
import { notifyUniNavi } from '~/apps/profiles/src/lib'
4+
35
import { ACTIONS } from '../../config'
46
import ConnectInfo from '../../models/ConnectInfo'
57
import EducationInfo from '../../models/EducationInfo'
@@ -89,6 +91,9 @@ const memberReducer: any = (
8991

9092
const newMemberInfo = _.cloneDeep(state.memberInfo)
9193
newMemberInfo.photoURL = action.payload
94+
if (newMemberInfo) {
95+
notifyUniNavi(newMemberInfo as any)
96+
}
9297

9398
return {
9499
...state,
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@import "@libs/ui/styles/includes";
2+
3+
.wrap {
4+
margin-top: $sp-2;
5+
6+
&:global(.mt0) {
7+
margin-top: 0;
8+
}
9+
}
10+
11+
.addButton {
12+
padding: 0 !important;
13+
color: $black-100;
14+
15+
svg {
16+
width: 20px;
17+
height: 20px;
18+
}
19+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { FC } from 'react'
2+
import classNames from 'classnames'
3+
4+
import { Button, IconOutline } from '~/libs/ui'
5+
6+
import styles from './AddButton.module.scss'
7+
8+
interface AddButtonProps {
9+
className?: string
10+
label?: string
11+
onClick: () => void
12+
variant?: 'mt0'
13+
}
14+
15+
const AddButton: FC<AddButtonProps> = props => (
16+
<div className={classNames(styles.wrap, props.variant, props.className)}>
17+
<Button
18+
icon={IconOutline.PlusIcon}
19+
onClick={props.onClick}
20+
className={styles.addButton}
21+
size='lg'
22+
label={props.label}
23+
link
24+
variant='linkblue'
25+
/>
26+
</div>
27+
)
28+
29+
export default AddButton
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as AddButton } from './AddButton'

src/apps/profiles/src/components/EditMemberPropertyBtn/EditMemberPropertyBtn.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
import { FC } from 'react'
2+
import classNames from 'classnames'
23

34
import { Button, IconOutline } from '~/libs/ui'
45

56
import styles from './EditMemberPropertyBtn.module.scss'
67

78
interface EditMemberPropertyBtnProps {
9+
className?: string
810
onClick: () => void
911
}
1012

1113
const EditMemberPropertyBtn: FC<EditMemberPropertyBtnProps> = (props: EditMemberPropertyBtnProps) => (
1214
<Button
1315
icon={IconOutline.PencilIcon}
1416
onClick={props.onClick}
15-
className={styles.editMemberPropertyBtn}
17+
className={classNames(styles.editMemberPropertyBtn, props.className)}
1618
size='lg'
1719
/>
1820
)

0 commit comments

Comments
 (0)