This commit is contained in:
bakhirev 2024-10-17 17:27:47 +03:00
parent de4ef1409c
commit 5c4766ace2
4 changed files with 46 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,3 +1,42 @@
import style from '../styles/index.module.scss';
const REF_TIMEZONE_CLASS = {
p1300: style.time_zone_map_point_p1300,
p1200: style.time_zone_map_point_p1200,
p1100: style.time_zone_map_point_p1100,
p1000: style.time_zone_map_point_p1000,
p1030: style.time_zone_map_point_p1030,
p0930: style.time_zone_map_point_p0930,
p0900: style.time_zone_map_point_p0900,
p0800: style.time_zone_map_point_p0800,
p0700: style.time_zone_map_point_p0700,
p0630: style.time_zone_map_point_p0630,
p0600: style.time_zone_map_point_p0600,
p0545: style.time_zone_map_point_p0545,
p0430: style.time_zone_map_point_p0430,
p0530: style.time_zone_map_point_p0530,
p0500: style.time_zone_map_point_p0500,
p0400: style.time_zone_map_point_p0400,
p0330: style.time_zone_map_point_p0330,
p0300: style.time_zone_map_point_p0300,
p0200: style.time_zone_map_point_p0200,
p0100: style.time_zone_map_point_p0100,
p0000: style.time_zone_map_point_p0000,
m0100: style.time_zone_map_point_m0100,
m0200: style.time_zone_map_point_m0200,
m0300: style.time_zone_map_point_m0300,
m0330: style.time_zone_map_point_m0330,
m0400: style.time_zone_map_point_m0400,
m0500: style.time_zone_map_point_m0500,
m0600: style.time_zone_map_point_m0600,
m0700: style.time_zone_map_point_m0700,
m0800: style.time_zone_map_point_m0800,
m0900: style.time_zone_map_point_m0900,
m1000: style.time_zone_map_point_m1000,
m1100: style.time_zone_map_point_m1100,
m1200: style.time_zone_map_point_m1200,
};
export function getGroupsByTimeZone(authors: any[]) {
return authors.reduce((acc: any, author: any) => {
const key = author.lastCommit.timezone;
@ -12,5 +51,5 @@ export function getClassNameForTimeZone(timezone?: string) {
.replace('+', 'p')
.replace('-', 'm')
.replace(':', '');
return `time_zone_map_point_${suffix || 'hide'}`;
return REF_TIMEZONE_CLASS[suffix] || style.time_zone_map_point_hide;
}

View file

@ -81,4 +81,5 @@
&_m1000 { top: 74%; left: 4%; }
&_m1100 { top: 67%; left: 0; }
&_m1200 { top: 62%; left: 97%; }
&_hide { display: none }
}