+
친구 추가
+
+
+
+
+
+
+
+ {mode === 'email' ? (
+
setInput({ ...input, email: e.target.value })}
+ />
+ ) : (
+ <>
+
setInput({ ...input, server: e.target.value })}
+ />
+
setInput({ ...input, name: e.target.value })}
+ />
+ >
+ )}
+
+
+
+
+
+
+ {error &&
{error}
}
+
+ {result && (
+
+
이메일: {result.email}
+
공개 여부: {result.is_public ? '공개' : '비공개'}
+
+ {result.is_friend ? (
+
✅ 이미 친구입니다
+ ) : result.request_sent ? (
+
⏳ 이미 요청 보낸 상태입니다
+ ) : result.request_received ? (
+
📩 상대가 요청을 보냈습니다 (요청 수락 화면에서 처리)
+ ) : (
+
+ )}
+
+ )}
+
+
+
+ >
+ )
+}
diff --git a/src/lib/api.ts b/src/lib/api.ts
index 9c788fe..7f420d7 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -1,8 +1,8 @@
import axios from 'axios'
const api = axios.create({
- baseURL: 'https://api.biryu2000.kr',
- // baseURL: 'http://localhost:8000',
+ // baseURL: 'https://api.biryu2000.kr',
+ baseURL: 'http://localhost:8000',
})
// 요청 시 토큰 자동 추가
diff --git a/src/pages/FriendListPage.tsx b/src/pages/FriendListPage.tsx
new file mode 100644
index 0000000..f8dd699
--- /dev/null
+++ b/src/pages/FriendListPage.tsx
@@ -0,0 +1,57 @@
+import { useEffect, useState } from 'react'
+import { useNavigate } from 'react-router-dom'
+import api from '../lib/api'
+import FriendSearchDialog from '../components/FriendSearchDialog'
+
+interface Friend {
+ id: number
+ email: string
+}
+
+export default function FriendListPage() {
+ const [friendIds, setFriendIds] = useState