feat: migrate from useAuth to AuthContext for centralized auth state
• Полная миграция 64 компонентов с useAuth на AuthContext • Исправлена race condition в SMS регистрации • Улучшена SSR совместимость с таймаутами • Удалена дублирующая система регистрации • Обновлена документация архитектуры аутентификации Технические изменения: - AuthContext.tsx: централизованная система состояния - auth-flow.tsx: убрана агрессивная логика logout - confirmation-step.tsx: исправлена передача телефона - page.tsx: добавлена синхронизация состояния - 64 файла: миграция useAuth → useAuthContext 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -188,7 +188,7 @@ import { BaseSidebar } from './BaseSidebar'
|
||||
import { NavigationItem } from './types'
|
||||
|
||||
export function LogistSidebar() {
|
||||
const { user } = useAuth()
|
||||
const { user } = useAuthContext()
|
||||
const pathname = usePathname()
|
||||
const { isCollapsed, toggleSidebar } = useSidebar()
|
||||
|
||||
@ -284,7 +284,7 @@ import { WholesaleSidebar } from './WholesaleSidebar'
|
||||
import { LogistSidebar } from './LogistSidebar'
|
||||
|
||||
export function Sidebar() {
|
||||
const { user } = useAuth()
|
||||
const { user } = useAuthContext()
|
||||
|
||||
if (!user?.organization?.type) {
|
||||
return (
|
||||
|
Reference in New Issue
Block a user