removed state vars from function params

This commit is contained in:
zino
2021-05-15 23:19:43 +02:00
parent 39aa73b034
commit 5e9289f6dd
6 changed files with 39 additions and 103 deletions

View File

@@ -99,12 +99,6 @@ export default class Utils {
static getDayName(date: Date, locale: string) {
return date.toLocaleDateString(locale, { weekday: 'long' });
}
static generateRandomColor(): string {
const randomNumber: number = Math.floor((Math.random() * 10000) + 1);
const hue = randomNumber * 137.508; // use golden angle approximation
return `hsl(${hue},100%,75%)`;
}
}
}