@kcne commented on this pull request.
> + type: "threshold",
+ range: currentTheme === "dark" ? rangeColors :
Array.from(rangeColors).reverse(),
+ domain: [10, 20, 30, 40]
+ }
+ }
+ }, [
+ [Tooltip, {
+ text: (date, value) => getTooltipText(date, value, locale)
+ }]
+ ]);
+ }
+});
+
+function getThemeFromColorScheme(colorScheme) {
+ if (colorScheme === "auto") {
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark"
: "light";
You were completely right. I tried removing the method, but instead of doing
two things in one method or in if statement i just refactored the method and
moved it around a bit. Thank you.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#discussion_r1939881436
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5402/review/2590762...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev