added load-more button to player match-list

This commit is contained in:
2021-10-23 05:04:50 +02:00
parent 3113553f67
commit 71c37ca9b0
3 changed files with 34 additions and 6 deletions

View File

@@ -66,3 +66,16 @@ export const getPlayerValue = async (match_id) => {
console.log(err.response.status, err.response.statusText)
}
}
export const loadMoreMatches = async (player_id, date) => {
try {
const res = await axios.get(`${API_URL}/player/${player_id}/after/${date}`)
if (res.status === 200) {
return res.data
}
} catch (err) {
// TODO: 400, 404
console.log(err.response.status, err.response.statusText)
}
}