Skip to content

Commit 8b04fc2

Browse files
author
Sravan S
authored
hot-fix: ts-pattern bundle-inline (#503)
ts-pattern should be bundled inline, not as an external dep. Also: Fix USER_ACTIONS import in Edit User popup
1 parent f7f2c6a commit 8b04fc2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

rollup.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ module.exports = ({
4747
'css-vars-ponyfill',
4848
'date-fns',
4949
'dompurify',
50+
// todo@v4: remove this
5051
// we do not add ts-pattern as dep to avoid conflict with client base
51-
'ts-pattern',
52+
// 'ts-pattern',
5253
],
5354
plugins: [
5455
postcss({

src/smart-components/EditUserProfile/components/EditUserProfileUI/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { ButtonTypes } from '../../../../ui/Button';
1919
import Label, { LabelColors, LabelTypography } from '../../../../ui/Label';
2020
import TextButton from '../../../../ui/TextButton';
2121
import { noop } from '../../../../utils/utils';
22-
import * as userActions from '../../../../lib/dux/user/actionTypes';
22+
import { USER_ACTIONS } from '../../../../lib/dux/user/actionTypes';
2323

2424
export default function EditUserProfile(): ReactElement {
2525
const editProfileProps = useEditUserProfileContext();
@@ -61,7 +61,7 @@ export default function EditUserProfile(): ReactElement {
6161
nickname: inputRef?.current?.value,
6262
profileImage: newFile,
6363
}).then((updatedUser) => {
64-
userDispatcher({ type: userActions.UPDATE_USER_INFO, payload: updatedUser });
64+
userDispatcher({ type: USER_ACTIONS.UPDATE_USER_INFO, payload: updatedUser });
6565
if (onEditProfile && typeof onEditProfile === 'function') {
6666
onEditProfile(updatedUser);
6767
}

0 commit comments

Comments
 (0)