-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] 학교별 동아리 목록 페이지 구현 #307
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
Merged
The head ref may contain hidden characters: "306-feat-\uD559\uAD50\uBCC4-\uB3D9\uC544\uB9AC-\uBAA9\uB85D-\uD398\uC774\uC9C0-\uAD6C\uD604"
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2453fcf
[배포] 이미지 전처리, 광고 기능, 하단바 리디자인, 인앱 알림 페이지 및 토스트 프로덕션 배포 (#230)
ff1451 8dca13a
refactor: 가이드 페이지 이미지 변경 및 구조 개선 (#260)
ff1451 44949c9
Merge branch 'develop'
ff1451 d704e9f
Merge remote-tracking branch 'origin/develop'
ff1451 ff195df
Merge branch 'develop'
ff1451 39f6f3d
Merge branch 'develop'
ff1451 03c61c1
Merge remote-tracking branch 'origin/develop'
ff1451 4845837
Merge branch 'develop'
ff1451 9fb5634
hotfix: 행사 배너 제거
ff1451 d352fef
Merge remote-tracking branch 'origin/develop'
ff1451 51a70ea
feat: 학교별 동아리 목록 페이지 구현
ff1451 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import type { Region } from '@/apis/home/entity'; | ||
|
|
||
| export type ClubCategory = 'ACADEMIC' | 'SPORTS' | 'HOBBY' | 'RELIGION' | 'PERFORMANCE' | 'JUNIOR'; | ||
|
|
||
| export interface UniversityClubListRequestParams { | ||
| page?: number; | ||
| limit?: number; | ||
| query?: string; | ||
| category?: ClubCategory; | ||
| } | ||
|
|
||
| export interface UniversitySummary { | ||
| id: number; | ||
| name: string; | ||
| campusName: string; | ||
| region: Region; | ||
| regionName: string; | ||
| imageUrl: string; | ||
| } | ||
|
|
||
| export interface ClubCategorySummary { | ||
| category: ClubCategory; | ||
| categoryName: string; | ||
| count: number; | ||
| } | ||
|
|
||
| export interface UniversityClub { | ||
| id: number; | ||
| name: string; | ||
| imageUrl: string; | ||
| category: ClubCategory; | ||
| categoryName: string; | ||
| description: string; | ||
| memberCount: number; | ||
| } | ||
|
|
||
| export interface UniversityClubListResponse { | ||
| university: UniversitySummary; | ||
| totalCount: number; | ||
| totalPage: number; | ||
| currentPage: number; | ||
| categories: ClubCategorySummary[]; | ||
| clubs: UniversityClub[]; | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { apiClient } from '../client'; | ||
| import type { UniversityClubListRequestParams, UniversityClubListResponse } from './entity'; | ||
|
|
||
| export const getUniversityClubs = async (universityId: number, params?: UniversityClubListRequestParams) => { | ||
| const response = await apiClient.get<UniversityClubListResponse, UniversityClubListRequestParams>( | ||
| `konect/universities/${universityId}/clubs`, | ||
| { params } | ||
| ); | ||
| return response; | ||
| }; |
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 |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query'; | ||
|
|
||
| import type { UniversityClubListRequestParams, UniversityClubListResponse } from './entity'; | ||
| import { getUniversityClubs } from '.'; | ||
|
|
||
| type UniversityClubInfiniteListParams = Omit<UniversityClubListRequestParams, 'page'>; | ||
|
|
||
| export const universityClubQueryKeys = { | ||
| all: ['universityClub'] as const, | ||
| list: (universityId: number, params: UniversityClubListRequestParams) => | ||
| [ | ||
| ...universityClubQueryKeys.all, | ||
| 'list', | ||
| universityId, | ||
| params.page ?? 1, | ||
| params.limit ?? 12, | ||
| params.query ?? '', | ||
| params.category ?? '', | ||
| ] as const, | ||
| infinite: { | ||
| all: () => [...universityClubQueryKeys.all, 'infinite'] as const, | ||
| list: (universityId: number, params: UniversityClubInfiniteListParams) => | ||
| [ | ||
| ...universityClubQueryKeys.infinite.all(), | ||
| universityId, | ||
| params.limit ?? 12, | ||
| params.query ?? '', | ||
| params.category ?? '', | ||
| ] as const, | ||
| }, | ||
| }; | ||
|
|
||
| export const universityClubQueries = { | ||
| list: (universityId: number, params: UniversityClubListRequestParams) => | ||
| queryOptions({ | ||
| queryKey: universityClubQueryKeys.list(universityId, params), | ||
| queryFn: () => getUniversityClubs(universityId, params), | ||
| }), | ||
| infiniteList: (universityId: number, params: UniversityClubInfiniteListParams) => | ||
| infiniteQueryOptions({ | ||
| queryKey: universityClubQueryKeys.infinite.list(universityId, params), | ||
| queryFn: ({ pageParam }) => getUniversityClubs(universityId, { ...params, page: pageParam }), | ||
| initialPageParam: 1, | ||
| getNextPageParam: (lastPage: UniversityClubListResponse) => { | ||
| if (lastPage.currentPage < lastPage.totalPage) { | ||
| return lastPage.currentPage + 1; | ||
| } | ||
|
|
||
| return undefined; | ||
| }, | ||
| }), | ||
| }; |
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.
Tailwind 클래스 오타를 수정해주세요 (
xl:).Line 137의
className에xl: mt-7가 있어xl:가 단독 토큰으로 남습니다.xl:mt-7로 붙여야 의도한 반응형 마진이 적용됩니다.🤖 Prompt for AI Agents