diff --git a/src/app/(pages)/login/page.tsx b/src/app/(pages)/login/page.tsx index 7fe9a3d..84d3081 100644 --- a/src/app/(pages)/login/page.tsx +++ b/src/app/(pages)/login/page.tsx @@ -9,17 +9,25 @@ import {useRouter} from "next/navigation"; import {apiError} from "@kri/common/http"; import {NONE_HTTP_ERROR} from "@kri/common/http"; import {useLoginMutation} from "@/query/auth"; +import {useInternalInfoQuery} from "@/query/internal"; +import {cn} from "@/lib/utils"; const LoginPage = () => { const router = useRouter(); const loginMutation = useLoginMutation(); + const internalInfoQuery = useInternalInfoQuery(true); const [error, setError] = useState(null); const [userId, setUserId] = useState(""); const [userPw, setUserPw] = useState(""); + const clientIp = internalInfoQuery.data?.clientIp || ""; + const clientId = internalInfoQuery.data?.clientId || ""; + const isCallSeat = clientIp.startsWith("10.10.15"); + const isCallSeatAndUnable = isCallSeat && clientId === ""; + const passwordInputRef = useRef(null); const tryLogin = async () => { @@ -107,7 +115,12 @@ const LoginPage = () => { ref={passwordInputRef} /> - +

+ IP: {clientIp} +

+

+ {isCallSeatAndUnable? "전화걸기 이용 불가(관리자에게 문의해 주세요)" : `자리번호: ${clientId}`} +

{error && (

{error} @@ -116,7 +129,7 @@ const LoginPage = () => {