This commit is contained in:
ct
2025-07-15 03:27:39 +08:00
parent eb207b98d9
commit 852346ee3b
13 changed files with 44 additions and 61 deletions

View File

@@ -18,7 +18,8 @@ const AuthDialog = ({}) => {
// Listen for text element selection (but don't auto-open sidebar)
useEffect(() => {
const handleOpenAuth = () => {
setIsOpen(true);
// Disabled for MVP - don't auto-open auth dialog
// setIsOpen(true);
};
const handleOpenLogin = () => {

View File

@@ -1,18 +1,15 @@
import useUserStore from '@/stores/UserStore';
import { usePage } from '@inertiajs/react';
import { useEffect } from 'react';
const AuthUser = () => {
const { auth } = usePage().props;
const { user, fetchUser } = useUserStore();
useEffect(() => {
if (auth.user) {
if (user == null) {
fetchUser();
}
// Always try to fetch user data on component mount
if (user === null) {
fetchUser();
}
}, [auth.user]);
}, [user, fetchUser]);
};
export default AuthUser;