-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from hufs-sports-live/refactor/match-page
[REFACTOR] match page 내부 수정 및 리팩토링
- Loading branch information
Showing
43 changed files
with
377 additions
and
728 deletions.
There are no files selected for viewing
This file contains 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 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 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 was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains 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,47 @@ | ||
import { | ||
MatchCheerType, | ||
MatchCommentType, | ||
MatchDetailType, | ||
MatchLineupType, | ||
MatchTimelineType, | ||
} from '@/types/match'; | ||
|
||
import instance from '.'; | ||
|
||
export const getMatchById = async (gameId: string) => { | ||
const { data } = await instance.get<MatchDetailType>(`/games/${gameId}`); | ||
|
||
return data; | ||
}; | ||
|
||
export const getMatchCheerById = async (matchId: string) => { | ||
const { data } = await instance.get<MatchCheerType[]>( | ||
`/games/${matchId}/cheer`, | ||
); | ||
|
||
return data; | ||
}; | ||
|
||
export const getGameComments = async (gameId: string, cursor = 1) => { | ||
const response = await instance.get<MatchCommentType[]>( | ||
`/games/${gameId}/comments?cursor=${cursor}`, | ||
); | ||
|
||
return response.data; | ||
}; | ||
|
||
export const getMatchTimelineById = async (matchId: string) => { | ||
const { data } = await instance.get<MatchTimelineType[]>( | ||
`/games/${matchId}/timeline`, | ||
); | ||
|
||
return data; | ||
}; | ||
|
||
export const getMatchLineupById = async (matchId: string) => { | ||
const { data } = await instance.get<MatchLineupType[]>( | ||
`/games/${matchId}/lineup`, | ||
); | ||
|
||
return data; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.