Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ h4 {
fill: url(#ggold);
}

.contest-other-table tr {
.contest-other-table tbody tr {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.contest-other-table tr td {
.contest-other-table tbody tr:nth-of-type(odd) {
background-color: rgba(0, 0, 0, 0.025);
}
.contest-other-table tbody tr:hover {
background-color: rgba(0, 0, 0, 0.05);
}
.contest-other-table tbody tr td {
flex: auto;
word-break: break-word;
}
Expand Down
6 changes: 5 additions & 1 deletion src/utils/TypedCachedApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export type UserParam = 'id' | 'name' | 'twitter';

const fetchContests = () =>
fetchJson<Contest[]>(`${STATIC_API_BASE_URL}/contest/past`);
const fetchCurrentContests = () =>
fetchJson<Contest[]>(`${STATIC_API_BASE_URL}/contest/current`);
const fetchProblems = () =>
fetchJson<Problem[]>(`${STATIC_API_BASE_URL}/problems`);
const fetchLanguages = () =>
Expand Down Expand Up @@ -65,7 +67,9 @@ let CACHED_CONTESTS: Contest[];
export const cachedContestArray = async (): Promise<Contest[]> => {
if (CACHED_CONTESTS === undefined) {
try {
CACHED_CONTESTS = (await fetchContests()).concat(OpenContests);
CACHED_CONTESTS = (await fetchCurrentContests())
.concat(await fetchContests())
.concat(OpenContests);
} catch (e) {
console.log(e);
CACHED_CONTESTS = [];
Expand Down