link to all matches on bot page
This commit is contained in:
parent
7ba9fcee64
commit
4dcccb589d
1 changed files with 21 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
||||||
try {
|
try {
|
||||||
const [botData, matches] = await Promise.all([
|
const [botData, matches] = await Promise.all([
|
||||||
apiClient.get(`/api/bots/${params["bot_name"]}`),
|
apiClient.get(`/api/bots/${params["bot_name"]}`),
|
||||||
apiClient.get("/api/matches", { bot: params["bot_name"] }),
|
apiClient.get("/api/matches", { bot: params["bot_name"], count: "20" }),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const { bot, owner, versions } = botData;
|
const { bot, owner, versions } = botData;
|
||||||
|
@ -95,6 +95,11 @@
|
||||||
<div class="matches">
|
<div class="matches">
|
||||||
<h3>Recent matches</h3>
|
<h3>Recent matches</h3>
|
||||||
<MatchList {matches} />
|
<MatchList {matches} />
|
||||||
|
{#if matches.length > 0}
|
||||||
|
<div class="btn-container">
|
||||||
|
<a class="btn-view-more" href={`/matches?bot=${bot["name"]}`}>All matches</a>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="versions">
|
<!-- <div class="versions">
|
||||||
|
@ -141,6 +146,21 @@
|
||||||
margin-bottom: $header-space-above-line;
|
margin-bottom: $header-space-above-line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$borderColor: rgba(27, 31, 36, 0.25);
|
||||||
|
|
||||||
|
.btn-container {
|
||||||
|
padding: 24px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.btn-view-more {
|
||||||
|
color: rgb(9, 105, 218);
|
||||||
|
font-size: 14px;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 6px 16px;
|
||||||
|
border: 1px solid $borderColor;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.versions {
|
.versions {
|
||||||
margin: 30px 0;
|
margin: 30px 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue