mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
Global filters (#40)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user