()
| 1 | import { useAuthStore } from '@/store/authStore'; |
| 2 | |
| 3 | export const useAuth = () => { |
| 4 | const auth = useAuthStore(); |
| 5 | |
| 6 | return { |
| 7 | // State |
| 8 | user: auth.user, |
| 9 | isAuthenticated: auth.isAuthenticated, |
| 10 | isLoading: auth.isLoading, |
| 11 | error: auth.error, |
| 12 | settings: auth.settings, |
| 13 | |
| 14 | // Actions |
| 15 | login: auth.login, |
| 16 | signup: auth.signup, |
| 17 | logout: auth.logout, |
| 18 | updateProfile: auth.updateProfile, |
| 19 | updateSettings: auth.updateSettings, |
| 20 | |
| 21 | // Helpers |
| 22 | setError: auth.setError, |
| 23 | clearError: auth.clearError, |
| 24 | }; |
| 25 | }; |
| 26 | |
| 27 | export default useAuth; |
no outgoing calls
no test coverage detected