|
|
@ -21,7 +21,7 @@ function AuthApp() {
|
|
|
|
const navigate = useNavigate()
|
|
|
|
const navigate = useNavigate()
|
|
|
|
|
|
|
|
|
|
|
|
const { colorPrimary, borderRadius } = useThemeContext()
|
|
|
|
const { colorPrimary, borderRadius } = useThemeContext()
|
|
|
|
const { loginUser } = useAuthStore()
|
|
|
|
const loginUser = useAuthStore(state => state.loginUser)
|
|
|
|
|
|
|
|
|
|
|
|
const href = useHref()
|
|
|
|
const href = useHref()
|
|
|
|
|
|
|
|
|
|
|
@ -36,7 +36,7 @@ function AuthApp() {
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
if (loginUser.userId > 0) {
|
|
|
|
if (loginUser.userId > 0) {
|
|
|
|
useConversationStore.getState().connectWebsocket(loginUser.userId);
|
|
|
|
useConversationStore.getState().connectWebsocket(loginUser.userId);
|
|
|
|
useConversationStore.getState().fetchInitialData(loginUser.userId);
|
|
|
|
useConversationStore.getState().fetchInitialData(loginUser.userId); // userIdStr
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return () => {
|
|
|
|
return () => {
|
|
|
|
useConversationStore.getState().disconnectWebsocket();
|
|
|
|
useConversationStore.getState().disconnectWebsocket();
|
|
|
|