Skip to content

Commit 6d91884

Browse files
committed
fix: update occupation tags and improve card settings handling in HelloTab component
1 parent 530796d commit 6d91884

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/features/onboarding/components/steps/HelloTab.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ const OCCUPATIONS: Occupation[] = [
2828
icon: RiDeviceFill,
2929
value: 'fullstack',
3030
sources: ['devto', 'github', 'medium', 'hashnode'],
31-
tags: ['javascript', 'typescript', 'php', 'ruby', 'rust'],
31+
tags: ['webdev', 'javascript', 'typescript', 'php', 'devops'],
3232
},
3333
{
3434
title: 'Mobile',
3535
value: 'mobile',
3636
icon: AiFillMobile,
3737
sources: ['reddit', 'github', 'medium', 'hashnode'],
3838
tags: [
39-
'android',
4039
'mobile',
40+
'android',
4141
'kotlin',
4242
'java',
4343
'ios',
@@ -73,7 +73,7 @@ const OCCUPATIONS: Occupation[] = [
7373
value: 'ai',
7474
icon: FaRobot,
7575
sources: ['github', 'hackernoon', 'hackernews', 'devto'],
76-
tags: ['machine learning', 'artificial intelligence', 'python'],
76+
tags: ['artificial intelligence', 'machine learning', 'python'],
7777
},
7878
{
7979
title: 'Other',
@@ -85,8 +85,14 @@ const OCCUPATIONS: Occupation[] = [
8585
]
8686

8787
export const HelloTab = () => {
88-
const { markOnboardingAsCompleted, setCards, setTags, setOccupation, occupation } =
89-
useUserPreferences()
88+
const {
89+
markOnboardingAsCompleted,
90+
setCardSettings,
91+
setCards,
92+
setTags,
93+
setOccupation,
94+
occupation,
95+
} = useUserPreferences()
9096

9197
const { tags } = useRemoteConfigStore()
9298

@@ -108,6 +114,12 @@ export const HelloTab = () => {
108114
.filter(Boolean) as Array<Tag>
109115

110116
setTags(userTags)
117+
for (const source of selectedOccupation.sources) {
118+
setCardSettings(source, {
119+
language: selectedOccupation.tags[0],
120+
sortBy: 'published_at',
121+
})
122+
}
111123
}
112124

113125
markOnboardingAsCompleted()

0 commit comments

Comments
 (0)