-
Notifications
You must be signed in to change notification settings - Fork 21
Feat/v6 -> dev #1271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Feat/v6 -> dev #1271
Changes from 250 commits
1afb702
e960d77
7b5886f
8a88c71
2578e25
eeae760
d3d3098
3c12410
1e3cb55
e699664
26fe69e
e842546
702a0b7
851a515
b4c9243
31d9989
29a3deb
3b25f08
f945814
003f6bb
70e9a61
ce55788
f869821
3590b3d
3efd6b5
f414b0e
085d293
6db69ee
95cf7a2
d6916d6
c50842f
1ae2533
4422d9b
869b21c
34f6614
45a2bbe
236800d
522b040
29856c0
9a6c943
ec87f00
2811837
7ecba71
d404274
97abdf8
b379a2d
4da9381
1b1cda4
134cfc9
97fe588
6988cda
d67cbad
e1d363f
3ba8525
2e0ef09
ccf5b42
435c684
25398d8
bf53be5
016c2a4
88e8fb1
6d61a18
d2308d3
7876dca
0b3922b
14eb524
e996e50
f94713d
6ad92b3
68bfb67
b24ae08
75874b6
790b39e
2d7c28b
59dcc30
8a04d28
172052a
bb61977
152ed65
aa612f8
bc1e341
fddba32
651f0f6
e97c0db
effae6e
aab03b5
c6ebadb
ad798e5
d3054eb
1ce2e63
44c223a
cd550ac
6bf4091
b08f16a
2ac2749
2cfb5f1
53877bb
eb789c1
86e5a98
3dd0f3e
00ff845
55c1d16
a4cfad3
2d36c9a
8e85eba
ebe37a7
28f9462
1bfa7b8
3a17f40
7899b5d
8e2254c
5ef27c5
33bca02
7ef1d05
278892f
149b6d7
52f36cc
fc8e91c
98f93b7
f39eccd
afd10db
cde9241
036c04f
5db7501
05f9757
ddbd5ab
d8cdb2e
0d152b8
f14a9d0
72701bb
a434ecf
0eed814
2408f74
9785cd3
e0a8b00
8c0f17a
2c04c42
d0958e9
fe2b934
58ac9ec
4e1537b
733f20e
3aa7a53
c7fbf65
a14a892
5e3f4b6
f74fca9
2b777f7
3db9e9d
34740f8
aeb2ec0
e74549c
edbce6f
4ea10b4
43ed942
cdf93cf
45baff9
1d2e188
524ca46
0c03c18
a2786c7
860bd1e
59e0415
54f1de0
1f5df32
105a947
2d0726e
6f043bb
8131b3f
3dd9bb8
db41d8a
773cadf
9944d26
0c4cf29
1eb5cae
14fbe40
5d94f8f
eed2f5f
ab3b2d1
d6aa47a
a65ef7d
bd7477f
1364dbd
8aeeb13
383480e
18a4042
5f68c79
9b1890c
399862d
c9ea539
7a93c34
8c944bf
d55d4af
d2891bf
6cf5fa7
0c55447
b00e66e
7378d26
f113220
a831af1
b4736a9
7c8c791
8e96cb8
baa7ac4
d6ad95d
8e44e46
e669fb3
1d52f66
1513897
c29aa96
52bebec
bdaff02
7575141
0b83fb8
89e6003
035989e
9758798
a8a6d32
e0e3051
0e8502d
4cdc040
49c1347
b0b97d5
bab9630
9346445
9cf3196
0701221
5a9ff51
bbdd191
69a7641
57d4568
c216c81
372df44
ae47522
f3c9d00
71c080e
3f50487
3c2085c
b979710
ee9d824
1d7e43e
fe27eb2
37b1181
da5d4f6
1450018
88ff920
7a8f7dc
2386d72
27ec4b4
67a2a6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| node_modules | ||
| /.pnp | ||
| .pnp.js | ||
| .yarn | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| const path = require('path'); | ||
|
|
||
| const tsconfigPath = path.resolve(__dirname, '../tsconfig.json'); | ||
| const tsconfigRoot = path.resolve(__dirname, '..'); | ||
|
|
||
| module.exports = { | ||
| root: true, | ||
| overrides: [ | ||
|
|
@@ -25,8 +30,8 @@ module.exports = { | |
| parser: '@typescript-eslint/parser', | ||
| parserOptions: { | ||
| useJSXTextNode: true, | ||
| project: './tsconfig.json', | ||
| tsconfigRootDir: '.', | ||
| project: tsconfigPath, | ||
| tsconfigRootDir: tsconfigRoot, | ||
| tsx: true, | ||
| jsx: true, | ||
| sourceType: 'module', | ||
|
|
@@ -40,7 +45,19 @@ module.exports = { | |
| ], | ||
| settings: { | ||
| 'import/resolver': { | ||
| typescript: {}, | ||
| typescript: { | ||
| project: tsconfigPath, | ||
| }, | ||
| node: { | ||
| extensions: [ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
| '.js', | ||
| '.jsx', | ||
| '.ts', | ||
| '.tsx', | ||
| '.d.ts', | ||
| '.json', | ||
| ], | ||
| }, | ||
| }, | ||
| }, | ||
| rules: { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import { EnvironmentConfig } from '~/config' | ||
| // (removed) CES Survey/Userflow integrations | ||
|
|
||
| export const CES_SURVEY_ID = EnvironmentConfig.USERFLOW_SURVEYS.ACCOUNT_SETTINGS | ||
| // Mark this file as a module for TS isolatedModules | ||
| export {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| export * from './accounts-swr' | ||
| export * from './components' | ||
| export * from './assets' | ||
| export * from './userflow-survey' |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,9 +15,10 @@ import { | |
| useMemberTraits, | ||
| UserProfile, | ||
| UserTrait, | ||
| UserTraitIds, | ||
| UserTraits, | ||
| } from '~/libs/core' | ||
| import { SettingSection, triggerSurvey } from '~/apps/accounts/src/lib' | ||
| import { SettingSection } from '~/apps/accounts/src/lib' | ||
|
|
||
| import { UserAndPassFromConfig } from './user-and-pass.form.config' | ||
| import styles from './UserAndPassword.module.scss' | ||
|
|
@@ -76,13 +77,13 @@ const UserAndPassword: FC<UserAndPasswordProps> = (props: UserAndPasswordProps) | |
| data: [{ | ||
| userConsent: !userConsent, | ||
| }], | ||
| traitId: UserTraitIds.personalization, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| }, | ||
| }]) | ||
| .then(() => { | ||
| setUserConsent(!userConsent) | ||
| mutateTraits() | ||
| toast.success('User consent updated successfully.') | ||
| triggerSurvey() | ||
| }) | ||
| .catch(() => { | ||
| toast.error('Failed to update user consent.') | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,6 @@ import { | |
| DesignTrackIcon, | ||
| DevelopmentTrackIcon, | ||
| SettingSection, | ||
| triggerSurvey, | ||
| } from '~/apps/accounts/src/lib' | ||
|
|
||
| import styles from './Tracks.module.scss' | ||
|
|
@@ -21,6 +20,7 @@ interface TracksProps { | |
| const Tracks: FC<TracksProps> = (props: TracksProps) => { | ||
| const [memberTracks, setMemberTracks]: [TC_TRACKS[], Dispatch<TC_TRACKS[]>] | ||
| = useState<TC_TRACKS[]>(props.profile.tracks || []) | ||
| const [isUpdating, setIsUpdating] = useState<boolean>(false) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
|
|
||
| const memberProfileContext: ProfileContextData = useContext(profileContext) | ||
|
|
||
|
|
@@ -29,6 +29,11 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| }, [props.profile]) | ||
|
|
||
| function handleTracksChange(type: TC_TRACKS): void { | ||
| if (isUpdating) { | ||
| return | ||
| } | ||
|
|
||
| setIsUpdating(true) | ||
| const hasTrack: boolean = memberTracks.includes(type) | ||
| let updatedTracks: TC_TRACKS[] | ||
|
|
||
|
|
@@ -54,11 +59,13 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| } as any, | ||
| }) | ||
| toast.success('Your profile has been updated.') | ||
| triggerSurvey() | ||
| }) | ||
| .catch(() => { | ||
| toast.error('Failed to update your profile.') | ||
| }) | ||
| .finally(() => { | ||
| setIsUpdating(false) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| }) | ||
| } | ||
|
|
||
| return ( | ||
|
|
@@ -83,6 +90,7 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| name='designTrack' | ||
| onChange={bind(handleTracksChange, this, 'DESIGN')} | ||
| value={!!memberTracks.includes('DESIGN')} | ||
| disabled={isUpdating} | ||
| /> | ||
| )} | ||
| /> | ||
|
|
@@ -98,6 +106,7 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| name='devTrack' | ||
| onChange={bind(handleTracksChange, this, 'DEVELOP')} | ||
| value={!!memberTracks.includes('DEVELOP')} | ||
| disabled={isUpdating} | ||
| /> | ||
| )} | ||
| /> | ||
|
|
@@ -113,6 +122,7 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| name='dsTrack' | ||
| onChange={bind(handleTracksChange, this, 'DATA_SCIENCE')} | ||
| value={!!memberTracks.includes('DATA_SCIENCE')} | ||
| disabled={isUpdating} | ||
| /> | ||
| )} | ||
| /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[⚠️
correctness]The
typescriptresolver configuration now explicitly sets theprojecttotsconfigPath. Ensure that this path is correct and accessible in all environments where this configuration will be used, as incorrect paths can lead to resolution issues.