File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 2
2
import type { CollectionEntry } from ' astro:content' ;
3
3
import { Icon } from ' astro-icon' ;
4
4
import { getProjectsByPerson } from ' ../helpers/projects' ;
5
- import { getPersonTags } from ' ../helpers/people' ;
5
+ import { getPersonTags , isProfessor } from ' ../helpers/people' ;
6
6
import {
7
7
getCourseAbbreviationByOccupation ,
8
8
getCourseAbbreviationCampusByOccupation ,
@@ -110,9 +110,7 @@ const tags = await getPersonTags(person);
110
110
))
111
111
}
112
112
{
113
- person .data .occupations .some (
114
- (occupation ) => occupation .type === ' professor'
115
- ) && (
113
+ isProfessor (person ) && (
116
114
<span class = " text-[10px] pointer text-[10px] inline-block font-semibold text-gray-700 bg-gray-100 hover:bg-gray-200 m-0.5 py-px px-0.5 rounded-full" >
117
115
professor
118
116
</span >
Original file line number Diff line number Diff line change 1
1
import { getCollection } from 'astro:content' ;
2
2
import { getProjectsByPerson } from './projects' ;
3
3
4
- function isStudent ( person ) {
4
+ export function isStudent ( person ) {
5
5
return person . data . occupations . some (
6
6
( occupation ) => occupation . type === 'student'
7
7
) ;
8
8
}
9
9
10
- function isProfessor ( person ) {
10
+ export function isProfessor ( person ) {
11
11
return person . data . occupations . some (
12
12
( occupation ) => occupation . type === 'professor'
13
13
) ;
You can’t perform that action at this time.
0 commit comments