mirror of
https://github.com/mue/mue.git
synced 2026-07-17 05:54:14 +02:00
feat: individual widget zoom, hot reload for font and custom js/css etc
This commit is contained in:
@@ -4,6 +4,7 @@ import { WiDirectionDownLeft, WiDirectionDownRight, WiDirectionDown, WiDirection
|
||||
export default function WindDirectionIcon(props) {
|
||||
let icon;
|
||||
|
||||
// convert the number openweathermap gives us to closest direction or something
|
||||
const getDirection = (angle) => {
|
||||
const directions = ['North', 'North-West', 'West', 'South-West', 'South', 'South-East', 'East', 'North-East'];
|
||||
return directions[Math.round(((angle %= 360) < 0 ? angle + 360 : angle) / 45) % 8];
|
||||
|
||||
Reference in New Issue
Block a user