Global filters (#40)

This commit is contained in:
Timothy Armes
2023-07-05 17:27:53 +02:00
parent caaad4e229
commit 15ead0b877
11 changed files with 168 additions and 71 deletions
+10 -5
View File
@@ -2,9 +2,10 @@ import { useMap } from "react-leaflet";
import { useEffect } from "react";
import { useTranslations } from "next-intl";
import L from "leaflet";
import { TimeControl } from "@/types";
const Legend = () => {
const t = useTranslations("App");
const t = useTranslations("Tournaments");
const map = useMap();
useEffect(() => {
@@ -20,16 +21,20 @@ const Legend = () => {
);
div.innerHTML = `<ul>
<li><span style='background:#00ac39; display: block; height: 16px; width: 30px; border: 1px solid #999; float: left; margin-right: 5px'></span>${t(
"tcClassic"
"timeControlEnum",
{ tc: TimeControl.Classic }
)}</li>
<li><span style='background:#0086c7; display: block; height: 16px; width: 30px; border: 1px solid #999; float: left; margin-right: 5px'></span>${t(
"tcRapid"
"timeControlEnum",
{ tc: TimeControl.Rapid }
)}</li>
<li><span style='background:#cec348; display: block; height: 16px; width: 30px; border: 1px solid #999; float: left; margin-right: 5px'></span>${t(
"tcBlitz"
"timeControlEnum",
{ tc: TimeControl.Blitz }
)}</li>
<li><span style='background:#d10c3e; display: block; height: 16px; width: 30px; border: 1px solid #999; float: left; margin-right: 5px'></span>${t(
"tcKO"
"timeControlEnum",
{ tc: TimeControl.KO }
)}</li>
</ul>`;
return div;