Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3769e39
style : κΈΈλ“œ 검색 색 λ³€κ²½
play3step Jun 13, 2025
e9bd031
feat : κΈΈλ“œ 검색할 κΈΈλ“œ 리슀트 μΆ”κ°€
play3step Jun 13, 2025
3144d86
feat : κΈΈλ“œ 검색 νŽ˜μ΄μ§€ λΌμš°ν„° μ§€μ • 및 헀더 μΆ”κ°€
play3step Jun 13, 2025
353dbf9
style : κΈΈλ“œ μ›”λ“œ 선택 λ²„νŠΌ μΆ”κ°€
play3step Jun 13, 2025
d653894
feat : 둜그인 없이 κΈΈλ“œ 쑰회 μΆ”κ°€
play3step Jun 13, 2025
610c1c4
feat : κΈΈλ“œ 검색 νƒ€μž…
play3step Jun 14, 2025
98c1146
feat : κΈΈλ“œ 검색 params μΆ”κ°€
play3step Jun 14, 2025
b3eeb20
refactor : κΈΈλ“œ 검색 λ¦¬νŽ™ν† λ§ 및 데이터 없을 경우 검색 μ°½ 좜λ ₯
play3step Jun 14, 2025
e7146ce
fix : λ””ν΄νŠΈ μœ μ € 정보 및 νƒ€μž… μˆ˜μ •
play3step Jun 14, 2025
95d03ca
feat : params 쑰회 및 κΈΈλ“œ 검색
play3step Jun 15, 2025
a84bca1
feat : κΈΈλ“œ 검색 κ²°κ³Ό 좜λ ₯ 및 μ—‘μ…˜ λ²„νŠΌ μˆ˜μ •
play3step Jun 15, 2025
683a615
fix : 본캐 뢀캐 비ꡐ id μ—μ„œ λ‹‰λ„€μž„μœΌλ‘œ μˆ˜μ •
play3step Jun 15, 2025
b00aa74
feat : κΈΈλ“œ 검색 κ²°κ³Ό ν›„ 본캐/뢀캐 정보 μΆ”κ°€ 쑰회
play3step Jun 15, 2025
3ecce5b
feat : λ‹€λ₯Έ κΈΈλ“œ 검색 및 κΈΈλ“œ 검색 였λ₯˜ μΆ”κ°€
play3step Jun 16, 2025
193d67b
feat : κΈΈλ“œ 검색 뢀캐릭터 λͺ¨λ‹¬ 생성 μΆ”κ°€
play3step Jun 16, 2025
f3738d5
feat : κΈΈλ“œ 멀보 μΉ΄λ“œ 2, 4, 8개 보기 μΆ”κ°€
play3step Jun 16, 2025
8ac9d34
feat : κΈΈλ“œ 멀버 본캐/뢀캐/μ™ΈλΆ€ 총 인원 좜λ ₯
play3step Jun 16, 2025
f173566
style : 본캐/뢀캐 쑰회 λ²„νŠΌ λ””μžμΈ μˆ˜μ •
play3step Jun 16, 2025
b23c6f3
fix : 캐릭터 μ„€λͺ… 없을 경우 뢀캐릭 λͺ©λ‘ 보기
play3step Jun 16, 2025
b5b4240
style : κΈΈλ“œ λ§ˆμŠ€ν„° νƒ€μž… μΆ”κ°€
play3step Jun 16, 2025
051caad
style : 뢀캐릭터 νƒ€μž… 색 λ³€κ²½
play3step Jun 16, 2025
0f6578e
feat : 캐릭터 이름, 레벨 μ •λ ¬ μΆ”κ°€
play3step Jun 17, 2025
2b44815
feat: λΉ„λ‘œκ·ΈμΈ 캐릭터/κΈΈλ“œ 쑰회 κΈ°λŠ₯ μ—…λ°μ΄νŠΈ 곡지 μΆ”κ°€
play3step Jun 17, 2025
ec3b00e
fix : useQuery enabled μˆ˜μ • 및 κΈΈλ“œ κ°±μ‹  문ꡬ μˆ˜μ •
play3step Jun 17, 2025
1fcc4c2
fix : 캐릭터터 ocid μ €μž₯ μˆ˜μ • 및 둜그인 μƒνƒœμ—λ„ 캐릭터 검색 κ°€λŠ₯
play3step Jun 17, 2025
98b41cb
fix : 본캐/뢀캐 쑰회 λ‘œλ”© μΆ”κ°€
play3step Jun 17, 2025
914e3c8
style : 뢀캐릭터 총 수 μŠ€νƒ€μΌ μΆ”κ°€
play3step Jun 17, 2025
738de02
fix : λ³Έ/뢀캐 κ°±μ‹  disabled μΆ”κ°€
play3step Jun 17, 2025
2a1339d
fix : 캐릭터 검색 λ‘œλ”© μΆ”κ°€
play3step Jun 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Room from './pages/Room'
import { GuildPromotion } from './pages/GuildPromotion'
import Notice from './pages/Notice'
import { SearchCharacter } from './pages/SearchCharacter'
import { SearchGuild } from './pages/SearchGuild'

const router = createBrowserRouter([
{
Expand Down Expand Up @@ -126,6 +127,14 @@ const router = createBrowserRouter([
<SearchCharacter />
</Layout>
)
},
{
path: '/searchGuild',
element: (
<Layout>
<SearchGuild />
</Layout>
)
}
])

Expand Down
36 changes: 34 additions & 2 deletions src/apis/guild/guildController.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { basicApi, nexonApi } from '..'
import { Guild, SearchGuild } from '../../types/guild'
import { basicApi, nexonApi, publicApi } from '..'
import {
Guild,
SearchGuild,
SearchGuildMemberResponse,
SearchGuildResponse
} from '../../types/guild'

//κΈΈλ“œ λͺ©λ‘ 쑰회
export const fetchGuildList = async () => {
Expand Down Expand Up @@ -48,3 +53,30 @@ export const searchGuild = async (params: Guild) => {
)
return guildInfo
}

//둜그인 없이 κΈΈλ“œ 쑰회
export const searchGuildWithoutLogin = async (
guildNames: string[],
worldName: string
) => {
const response = await publicApi.post<SearchGuildResponse[]>(
'/api/v1/public/guilds/async/test',
{
guildNames,
worldName
}
)
return response.data
}

//둜그인 없이 κΈΈλ“œ λ³Έ/뢀캐 쑰회

export const searchGuildMemberWithoutLogin = async (members: string[]) => {
const response = await publicApi.post<SearchGuildMemberResponse[]>(
'/api/v1/public/guilds/member/async',
{
members
}
)
return response.data
}
8 changes: 8 additions & 0 deletions src/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ export const basicApi = axios.create({
}
})

export const publicApi = axios.create({
baseURL: API_KEY,
timeout: DEFAULT_TIMEOUT,
headers: {
'Content-Type': 'application/json;charset=utf-8'
}
})

basicApi.interceptors.request.use(config => {
const token = useAuthStore.getState().token
if (token) {
Expand Down
74 changes: 44 additions & 30 deletions src/components/character/CharacterPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,38 @@ import { StatContainer } from './StatContainer'
import { useCharacterData } from '../../hooks/character/useCharacterData'
import { useInventory } from '../../hooks/character/useInventory'
import { useNavigate } from 'react-router-dom'
import { useUserStore } from '../../store/userStore'
import { searchCharacterOcid } from '../../apis/character/characterController'

interface CharacterPageProps {
type: 'character' | 'search'
characterName?: string
setCharacterName?: (characterName: string) => void
searchCharacterHandler?: () => Promise<void>
}
export const CharacterPage = ({
type,
characterName,
setCharacterName,
searchCharacterHandler
}: CharacterPageProps) => {
export const CharacterPage = () => {
const { characterStats, ability, hyperStat, basic, isLoading, error } =
useCharacterData()
const [characterName, setCharacterName] = useState('')

const { inventory } = useInventory()

const [showStats, setShowStats] = useState(true)
const nav = useNavigate()
const { setCharacterOcid } = useUserStore()
const [searchLoading, setSearchLoading] = useState(false)

const searchCharacterHandler = async () => {
if (characterName.trim() === '') {
alert('캐릭터 이름을 μž…λ ₯ν•΄μ£Όμ„Έμš”.')
return
}

setSearchLoading(true)
const { ocid } = await searchCharacterOcid(characterName.trim())

if (!ocid) {
alert('캐릭터λ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€.')
return
}

setCharacterOcid(ocid)
setSearchLoading(false)
}

if (isLoading) {
return (
Expand Down Expand Up @@ -73,24 +85,26 @@ export const CharacterPage = ({
μž₯λΉ„ 정보
</button>
</div>
{type === 'search' ? (
<div className="flex items-center gap-2 w-64">
<input
type="text"
placeholder="캐릭터 이름을 μž…λ ₯ν•΄μ£Όμ„Έμš”"
className="flex-1 px-3 py-1.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"
value={characterName}
onChange={e => setCharacterName?.(e.target.value)}
/>
<button
onClick={searchCharacterHandler}
className="px-4 py-1.5 bg-gradient-to-r from-blue-500 to-blue-600 text-white text-sm font-medium rounded-lg hover:from-blue-600 hover:to-blue-700 transition-all shadow-sm flex-shrink-0">
검색
</button>
</div>
) : (
<div className="w-64">{/* 였λ₯Έμͺ½ 여백을 μœ„ν•œ 빈 div */}</div>
)}

<div className="flex items-center gap-2 w-64">
<input
type="text"
placeholder="캐릭터 이름을 μž…λ ₯ν•΄μ£Όμ„Έμš”"
className="flex-1 px-3 py-1.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"
value={characterName}
onChange={e => setCharacterName?.(e.target.value)}
/>
<button
onClick={searchCharacterHandler}
disabled={searchLoading}
className={`px-4 py-1.5 bg-gradient-to-r from-blue-500 to-blue-600 text-white text-sm font-medium rounded-lg hover:from-blue-600 hover:to-blue-700 transition-all shadow-sm flex-shrink-0 ${
searchLoading
? 'bg-blue-300 cursor-not-allowed'
: 'bg-blue-500 hover:bg-blue-600'
}`}>
{searchLoading ? '검색 쀑...' : '검색'}
</button>
</div>
</div>

{/* μ½˜ν…μΈ  μ˜μ—­ */}
Expand Down
20 changes: 11 additions & 9 deletions src/components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ function Header() {
<header className="w-full max-w-[1440px] mx-auto px-6 py-4 border-b border-blue-100 backdrop-blur-sm bg-white/80 flex justify-between items-center sticky top-0 z-50 shadow-sm">
<div className="flex items-center">
<Link
to={userType === 'search' ? '/' : '/character'}
to={
userType === 'search' || userType === undefined ? '/' : '/character'
}
className="flex items-center gap-2 hover:opacity-80 transition-all">
<img
src={Logo}
Expand All @@ -37,7 +39,7 @@ function Header() {

{/* Desktop Navigation */}
<nav className="hidden md:flex items-center gap-5 ml-10">
{userType === 'search' ? (
{userType === 'search' || userType === undefined ? (
<>
<Button
scheme="subtle"
Expand All @@ -46,13 +48,13 @@ function Header() {
className="hover:text-blue-600 font-medium transition-all">
캐릭터검색
</Button>
{/* <Button
<Button
scheme="subtle"
size="small"
onClick={() => nav('/rooms')}
onClick={() => nav('/searchGuild')}
className="hover:text-blue-600 font-medium transition-all">
κΈΈλ“œκ²€μƒ‰
</Button> */}
</Button>
</>
) : (
<>
Expand Down Expand Up @@ -131,7 +133,7 @@ function Header() {
{/* Mobile menu */}
{mobileMenuOpen && (
<div className="absolute top-full left-0 right-0 bg-white shadow-lg border-b border-blue-100 py-4 px-6 md:hidden flex flex-col gap-3">
{userType === 'search' ? (
{userType === 'search' || userType === undefined ? (
<>
<Button
scheme="subtle"
Expand All @@ -140,13 +142,13 @@ function Header() {
className="hover:text-blue-600 font-medium transition-all">
캐릭터검색
</Button>
{/* <Button
<Button
scheme="subtle"
size="small"
onClick={() => nav('/rooms')}
onClick={() => nav('/searchGuild')}
className="hover:text-blue-600 font-medium transition-all">
κΈΈλ“œκ²€μƒ‰
</Button> */}
</Button>
</>
) : (
<>
Expand Down
Loading