feat: Implement core e-learning classroom interface, user dashboard pages, authentication composable, and Thai localization.

This commit is contained in:
supalerk-ar66 2026-01-29 11:09:29 +07:00
parent 85d7c5c913
commit 9232b6a21d
5 changed files with 140 additions and 31 deletions

View file

@ -128,7 +128,8 @@ export const useAuth = () => {
// Shared state สำหรับเช็คว่ากำลังโหลดโปรไฟล์อยู่หรือไม่ เพื่อป้องกันการยิงซ้อน
const isProfileLoading = useState<boolean>('auth_profile_loading', () => false)
const isProfileLoaded = useState<boolean>('auth_profile_loaded', () => false)
// Init to true if we already have user data in cookie to avoid fetch on every hard refresh
const isProfileLoaded = useState<boolean>('auth_profile_loaded', () => !!user.value)
// ฟังก์ชันดึงข้อมูลโปรไฟล์ผู้ใช้ล่าสุด
const fetchUserProfile = async (forceRefresh = false) => {