refactor: move auth api call to api file

This commit is contained in:
2026-02-22 00:37:59 +07:00
parent 384ac12109
commit a64b63d0b2
5 changed files with 159 additions and 162 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import { createContext, useContext, useState, useEffect, type ReactNode } from "react"
import { useNavigate } from "react-router"
import { type User, getUser, getUserAsync, logout as logoutUser } from "@/lib/auth"
import { type User, getUser } from "@/lib/auth"
import { getUserAsync, logout as logoutUser } from "@/lib/api"
interface AuthContextType {
user: User | null