Compare commits

...

1 Commits

Author SHA1 Message Date
YuTengjing 6f50c81746 🔨 chore: add topic share schema and migration scripts
#### 💻 Change Type

<!-- For change type, change [ ] to [x]. -->

- [ ]  feat
- [ ] 🐛 fix
- [ ] ♻️ refactor
- [ ] 💄 style
- [ ] 👷 build
- [ ] ️ perf
- [ ]  test
- [ ] 📝 docs
- [x] 🔨 chore

#### 🔗 Related Issue

<!-- Link to the issue that is fixed by this PR -->

<!-- Example: Fixes #123, Closes #456, Related to #789 -->

#### 🔀 Description of Change

<!-- Thank you for your Pull Request. Please provide a description above. -->

#### 🧪 How to Test

<!-- Please describe how you tested your changes -->

<!-- For AI features, please include test prompts or scenarios -->

- [ ] Tested locally
- [ ] Added/updated tests
- [ ] No tests needed

#### 📸 Screenshots / Videos

<!-- If this PR includes UI changes, please provide screenshots or videos -->

| Before | After |
| ------ | ----- |
| ...    | ...   |

#### 📝 Additional Information

<!-- Add any other context about the Pull Request here. -->

<!-- Breaking changes? Migration guide? Performance impact? -->
2026-01-13 21:50:42 +08:00
+7
View File
@@ -47,7 +47,9 @@ export const createCommonSlice: StateCreator<
CommonAction
> = (set, get) => ({
refreshUserState: async () => {
console.log('[refreshUserState] calling mutate...');
await mutate(GET_USER_STATE_KEY);
console.log('[refreshUserState] mutate done');
},
updateAvatar: async (avatar) => {
await userService.updateAvatar(avatar);
@@ -97,6 +99,11 @@ export const createCommonSlice: StateCreator<
options?.onError?.(error);
},
onSuccess: (data) => {
console.log('[useInitUserState] onSuccess triggered', {
avatar: data?.avatar,
fullName: data?.fullName,
username: data?.username,
});
options?.onSuccess?.(data);
if (data) {