Skip to content

Commit b6039da

Browse files
committed
feat(officers): prep the page for the new administration
1 parent 23abe41 commit b6039da

2 files changed

Lines changed: 20 additions & 6 deletions

File tree

src/app/pages/officers/officers.data.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import { Indices } from 'utils/type-utils';
2+
3+
export const SEMESTERS = ['Spring', 'Summer', 'Fall'] as const;
4+
5+
type Semester = Indices<typeof SEMESTERS>;
6+
17
type ExecPosition =
28
| 'President'
39
| 'Vice President'
@@ -9,14 +15,13 @@ type ExecPosition =
915
| 'Director of Communications'
1016
| 'Director of Multimedia'
1117
| 'Director of Archives'
18+
| 'Secretary'
1219
| 'SFSS Council Representative'
13-
| 'Executive at Large'
14-
| 'First-Year Representative';
20+
| 'First-Year Representative'
21+
| 'Executive at Large';
1522

1623
type ElectedRep = 'Elections Officer' | 'Frosh Week Chair';
1724

18-
type Semester = 'Spring' | 'Summer' | 'Fall';
19-
2025
interface Executive {
2126
name: string;
2227
position: ExecPosition;
@@ -219,12 +224,14 @@ export const executives: ExecutiveAdministration[] = [
219224
{
220225
name: 'Arielle Felicia',
221226
position: 'Executive at Large',
222-
photoName: 'eal-1.jpg'
227+
photoName: 'eal-1.jpg',
228+
semester: 2
223229
},
224230
{
225231
name: 'Barsin Tafazzoli',
226232
position: 'Executive at Large',
227-
photoName: 'eal-2.jpg'
233+
photoName: 'eal-2.jpg',
234+
semester: 2
228235
}
229236
]
230237
}

src/app/utils/type-utils.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Use this type to get the indices of a tuple as a union type.
3+
* For example, if you have a tuple type `const myTuple = ['a', 'b', 'c'] as const`,
4+
* then `Indices<typeof myTuple>` will be `0 | 1 | 2`.
5+
* This is useful for creating types that depend on the indices of a tuple.
6+
*/
7+
export type Indices<T extends readonly unknown[]> = Exclude<Partial<T>['length'], T['length']>;

0 commit comments

Comments
 (0)