-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathtypes.ts
More file actions
55 lines (52 loc) · 1.63 KB
/
Copy pathtypes.ts
File metadata and controls
55 lines (52 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* View models for the project / opportunity cards. These are presentation
* types: the display app receives already-shaped data (built in the main
* Boundless app / backend) and renders it. Keep them free of API-schema
* imports so the cards stay portable.
*/
export type OpportunityCardStatus =
| 'open'
| 'applications'
| 'in_progress'
| 'review'
| 'completed';
export interface BuilderCardView {
id: string;
/** The builder's display name (e.g. "Jane Doe"). */
displayName: string;
/** URL-safe username (e.g. "janedoe"). */
username: string;
/** Optional avatar image URL. */
avatarSrc?: string;
/** Professional role or title (e.g. "Full-stack developer"). */
role?: string;
/** Country or city label (e.g. "Nigeria"). */
location?: string;
/** Up to 3-4 skill labels. */
skills?: string[];
/** Follower count when available. */
followers?: number;
/** Project count when available. */
projects?: number;
/** Profile page path so cards can link out. */
detailUrl: string;
}
export interface OpportunityCardView {
id: string;
org: string;
/** Display number rendered as `#42` next to the org. Pillar-local sequence. */
index: number;
status: OpportunityCardStatus;
title: string;
category: string;
participants: number;
/** Sub-mode label or pillar name. Empty string when nothing better is available. */
mode: string;
comments: number;
/** Pre-formatted countdown like `4D:22H:49M` when a deadline is available. */
endsIn?: string;
reward?: { amount: number; currency: string };
/** Detail page path so cards can link out. */
detailUrl: string;
isFeatured: boolean;
}