File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed
components/TeamMember/Section Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -6,22 +6,23 @@ export const Section = styled(DefaultSection)`
6
6
` ;
7
7
8
8
export const TeamMembersContainer = styled . div `
9
+ display: grid;
10
+ grid-template-columns: 1fr 1fr 1fr 1fr;
9
11
justify-content: center;
10
12
padding: 1rem;
11
13
gap: 2rem;
12
- column-count: 4;
13
14
box-sizing: border-box;
14
15
15
16
@media screen and (max-width: 1000px) {
16
- column-count: 3 ;
17
+ grid-template-columns: 1fr 1fr 1fr ;
17
18
}
18
19
19
20
@media screen and (max-width: 700px) {
20
- column-count: 2 ;
21
+ grid-template-columns: 1fr 1fr ;
21
22
}
22
23
23
24
@media screen and (max-width: 450px) {
24
- column-count: 1 ;
25
+ grid-template-columns: 1fr ;
25
26
}
26
27
` ;
27
28
Original file line number Diff line number Diff line change 3
3
import { TeamMembersContainer , Section } from "./TeamMembers.styles" ;
4
4
import TeamMember from "../TeamMember" ;
5
5
import { ITeamMember } from "@/utils/interfaces" ;
6
+ import { getPriority } from "../../../utils/functions" ;
6
7
7
8
const TeamMembersSection = ( {
8
9
teamMembers,
@@ -18,8 +19,11 @@ const TeamMembersSection = ({
18
19
{ fields : a } : { fields : ITeamMember } ,
19
20
{ fields : b } : { fields : ITeamMember } ,
20
21
) => {
21
- const aCombined = `${ a . role } ${ a . name } ` ;
22
- const bCombined = `${ b . role } ${ b . name } ` ;
22
+ const priorityA = getPriority ( a . role ) ;
23
+ const priorityB = getPriority ( b . role ) ;
24
+
25
+ const aCombined = `${ priorityA } ${ a . role } ${ a . name } ` ;
26
+ const bCombined = `${ priorityB } ${ b . role } ${ b . name } ` ;
23
27
24
28
return aCombined . localeCompare ( bCombined ) ;
25
29
} ,
Original file line number Diff line number Diff line change @@ -24,3 +24,14 @@ export const capitalize = (inputString: string): string => {
24
24
25
25
return capitalizedWords . join ( " " ) ;
26
26
} ;
27
+
28
+ export const getPriority = ( role : string ) : string => {
29
+ let priority = "" ;
30
+
31
+ if ( role . toUpperCase ( ) . includes ( "COORDENADOR" ) ) priority = "A" ;
32
+ else if ( role . toUpperCase ( ) . includes ( "LÍDER TÉCNICO" ) ) priority = "B" ;
33
+ else if ( role . toUpperCase ( ) . includes ( "PESQUISADOR" ) ) priority = "C" ;
34
+ else priority = "D" ;
35
+
36
+ return priority ;
37
+ } ;
You can’t perform that action at this time.
0 commit comments