-
Notifications
You must be signed in to change notification settings - Fork 2
feat: 매칭 현황 페이지 리팩터링 및 그룹 매칭 결과 뷰 수정, 페이지별 배경 색 변경 등 #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
heesunee
wants to merge
5
commits into
develop
Choose a base branch
from
feat/#404/matching-now
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
46e3a90
fix: SP2 홈 색상 변경 및 엠티뷰 수정 (#404)
heeseon-aicx dce0917
chore: tsconfig 포매팅 정리 및 점진 빌드 설정 추가 (#404)
heeseon-aicx 33e7486
refactor: 매칭 현황 탭을 생성/요청 구조로 리팩터링 (#404)
heeseon-aicx c61beda
feat: 그룹 매칭 생성 결과 뷰 추가 및 결과 페이지 내비게이션 정리 (#404)
heeseon-aicx c4874c5
style: 매칭·채팅 페이지 다크 테마 적용 (#404)
heeseon-aicx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,24 @@ | ||
| import type { TabType } from '@components/tab/tab/tab-content'; | ||
| import { ROUTES } from '@routes/routes-config'; | ||
| import { useState } from 'react'; | ||
| import { useNavigate, useSearchParams } from 'react-router-dom'; | ||
| import { useSearchParams } from 'react-router-dom'; | ||
| import { MATCH_TAB_TYPES, type MatchTabType } from '../constants/matching'; | ||
|
|
||
| export const useMatchTabState = () => { | ||
| const navigate = useNavigate(); | ||
| const [searchParams] = useSearchParams(); | ||
| const isMatchTabType = (value: string | null): value is MatchTabType => | ||
| value === MATCH_TAB_TYPES.CREATED || value === MATCH_TAB_TYPES.REQUESTED; | ||
|
|
||
| const isTabType = (value: string | null): value is TabType => { | ||
| return value === '1:1' || value === '그룹'; | ||
| }; | ||
| export const useMatchTabState = () => { | ||
| const [searchParams, setSearchParams] = useSearchParams(); | ||
|
|
||
| const tabParam = searchParams.get('tab'); | ||
| const filterParam = searchParams.get('filter'); | ||
| const initialTab: TabType = isTabType(tabParam) ? tabParam : '1:1'; | ||
| const initialFilter = filterParam || '전체'; | ||
| const initialTab: MatchTabType = isMatchTabType(tabParam) ? tabParam : MATCH_TAB_TYPES.CREATED; | ||
|
|
||
| const [tabState, setTabState] = useState({ type: initialTab, filter: initialFilter }); | ||
| const [activeTab, setActiveTab] = useState<MatchTabType>(initialTab); | ||
|
|
||
| const updateTabQuery = (type: TabType, filter: string) => { | ||
| const query = new URLSearchParams(); | ||
| query.set('tab', type); | ||
| query.set('filter', filter); | ||
| navigate(`${ROUTES.MATCH}?${query.toString()}`, { replace: true }); | ||
| const handleTabChange = (tab: MatchTabType) => { | ||
| setActiveTab(tab); | ||
| setSearchParams({ tab }, { replace: true }); | ||
| }; | ||
|
|
||
| const handleTabChange = (type: TabType) => { | ||
| setTabState({ type, filter: '전체' }); | ||
| updateTabQuery(type, '전체'); | ||
| }; | ||
|
|
||
| const handleFilterChange = (filter: string) => { | ||
| setTabState((prev) => { | ||
| const next = { ...prev, filter }; | ||
| updateTabQuery(next.type, filter); | ||
| return next; | ||
| }); | ||
| }; | ||
| const isCreatedTab = activeTab === MATCH_TAB_TYPES.CREATED; | ||
|
|
||
| return { tabState, handleTabChange, handleFilterChange }; | ||
| return { activeTab, handleTabChange, isCreatedTab }; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
띄어쓰기 불일치
Line 50의
"매칭 현황에서"와 Line 53의"매칭현황에서"사이에 띄어쓰기가 일관되지 않습니다. UI 일관성을 위해 통일해주세요.제안된 수정
📝 Committable suggestion
🤖 Prompt for AI Agents