chore: update user store

This commit is contained in:
Steven
2023-12-26 23:05:33 +08:00
parent f48ff102c9
commit 6fac116d8c
3 changed files with 26 additions and 26 deletions

View File

@ -1,8 +1,8 @@
import { useUserStore } from "@/store/v1";
import { extractUsernameFromName, useUserStore } from "@/store/v1";
const useCurrentUser = () => {
const userStore = useUserStore();
return userStore.getUserByUsername(userStore.currentUser?.username || "");
return userStore.getUserByUsername(extractUsernameFromName(userStore.currentUser) || "");
};
export default useCurrentUser;