Common.tsx 416 B

12345678910111213141516
  1. import { ColorType } from "@/context/themes/color"
  2. export const getThemeColor = (time: any) => {
  3. if (time.scenario == 'FAST') {
  4. return ColorType.fast
  5. }
  6. else if (time.scenario == 'SLEEP') {
  7. return ColorType.sleep
  8. }
  9. else {
  10. if (time.status == 'WAIT_FOR_START' || time.status == 'ONGOING3') {
  11. return ColorType.fast
  12. }
  13. return ColorType.sleep
  14. }
  15. }