|
1 |
| -import { rem, ThemeIcon } from "@mantine/core"; |
2 |
| -import { IconCheck, IconProgress, IconX } from "@tabler/icons-react"; |
3 |
| -import { fetchReport } from "@/app/downloads/github"; |
4 |
| -import React from "react"; |
5 |
| - |
6 |
| -export function IconDone() { |
7 |
| - return ( |
8 |
| - <ThemeIcon |
9 |
| - size={20} |
10 |
| - radius="xl" |
11 |
| - color="var(--mantine-color-green-9)" |
12 |
| - title="Done" |
13 |
| - > |
14 |
| - <IconCheck |
15 |
| - color="white" |
16 |
| - style={{ width: rem(12), height: rem(12) }} |
17 |
| - stroke={4} |
18 |
| - /> |
19 |
| - </ThemeIcon> |
20 |
| - ); |
21 |
| -} |
22 |
| - |
23 |
| -export function IconStub() { |
24 |
| - return ( |
25 |
| - <ThemeIcon size={20} radius="xl" title="Partial"> |
26 |
| - <IconProgress |
27 |
| - color="#3c1518" |
28 |
| - style={{ width: rem(12), height: rem(12) }} |
29 |
| - stroke={4} |
30 |
| - /> |
31 |
| - </ThemeIcon> |
32 |
| - ); |
33 |
| -} |
34 |
| - |
35 |
| -export function IconMissing() { |
36 |
| - return ( |
37 |
| - <ThemeIcon size={20} radius="xl" color="#3c1518" title="Missing"> |
38 |
| - <IconX |
39 |
| - color="white" |
40 |
| - style={{ width: rem(12), height: rem(12) }} |
41 |
| - stroke={4} |
42 |
| - /> |
43 |
| - </ThemeIcon> |
44 |
| - ); |
45 |
| -} |
46 |
| - |
47 |
| -export function ProgressIcon(type: "stub" | "missing" | "done") { |
48 |
| - switch (type) { |
49 |
| - case "stub": |
50 |
| - return <IconStub />; |
51 |
| - case "missing": |
52 |
| - return <IconMissing />; |
53 |
| - case "done": |
54 |
| - return <IconDone />; |
55 |
| - } |
56 |
| -} |
| 1 | +import type { AVM2Report } from "@/app/downloads/config"; |
57 | 2 |
|
58 | 3 | export interface SummaryStatistics {
|
59 | 4 | max_points: number;
|
@@ -82,7 +27,8 @@ export async function getReportByNamespace(): Promise<
|
82 | 27 | { [name: string]: NamespaceStatus } | undefined
|
83 | 28 | > {
|
84 | 29 | let byNamespace: { [name: string]: NamespaceStatus } = {};
|
85 |
| - const report = await fetchReport(); |
| 30 | + const reportReq = await fetch("/compatibility/fetch-report"); |
| 31 | + const report: AVM2Report = await reportReq.json(); |
86 | 32 | if (!report) {
|
87 | 33 | return;
|
88 | 34 | }
|
|
0 commit comments