(colorData: any, fontColor?: string)
| 69 | }; |
| 70 | |
| 71 | const randomizedByTime = (colorData: any, fontColor?: string) => { |
| 72 | const buildDate = new Date("Wed Jul 22 2020 17:00:00"); |
| 73 | const nowDate = new Date(); |
| 74 | nowDate.setSeconds(0); |
| 75 | nowDate.setMilliseconds(0); |
| 76 | |
| 77 | let diffMinute = Math.abs(nowDate.getTime() - buildDate.getTime()) / 60000; |
| 78 | if (diffMinute >= colorData.length) diffMinute %= colorData.length; |
| 79 | |
| 80 | return [ |
| 81 | colorData[diffMinute].color, |
| 82 | fontColor ? fontColor : colorData[diffMinute].text, |
| 83 | colorData[diffMinute].textBg, |
| 84 | ]; |
| 85 | }; |
| 86 | |
| 87 | export const checkReversal = (reversal: string | boolean) => { |
| 88 | if (reversal === "true" || reversal === true) { |
no outgoing calls
no test coverage detected