Skip to content

Commit dbd5cd2

Browse files
author
Elise Bach
committed
Small changes
1 parent 32465bf commit dbd5cd2

File tree

2 files changed

+65
-4
lines changed

2 files changed

+65
-4
lines changed

app/thread/[threadId]/page.module.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,24 @@
1515
padding: 24px;
1616
background: #fff;
1717
border-left: 1px solid #eee;
18+
}
19+
20+
.threadInfoGrid {
1821
display: grid;
1922
grid-template-columns: 1fr 2fr;
2023
grid-auto-rows: max-content;
2124
gap: 12px;
2225
}
2326

2427
.threadInfoProp {
28+
font-size: 14px;
2529
font-weight: bold;
2630
}
2731

32+
.threadInfoDesc {
33+
font-size: 14px;
34+
}
35+
2836
.message {
2937
padding: 12px;
3038
border-bottom: 1px solid #eee;
@@ -65,3 +73,14 @@
6573
font-size: 12px;
6674
color: var(--text-muted);
6775
}
76+
77+
.title {
78+
font-size: 14px;
79+
font-weight: bold;
80+
}
81+
82+
.description {
83+
font-size: 12px;
84+
color: var(--text-muted);
85+
margin-bottom: 16px;
86+
}

app/thread/[threadId]/page.tsx

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ function getFullname(actor) {
1818
}
1919
}
2020

21+
function getPriority(priority: 0 | 1 | 2 | 3) {
22+
switch (priority) {
23+
case 0: {
24+
return "Urgent";
25+
}
26+
case 1: {
27+
return "High";
28+
}
29+
case 2: {
30+
return "Normal";
31+
}
32+
case 3: {
33+
return "Low";
34+
}
35+
}
36+
}
37+
2138
export default async function ThreadPage({
2239
params,
2340
}: {
@@ -177,10 +194,35 @@ export default async function ThreadPage({
177194
</div>
178195

179196
<div className={styles.threadInfo}>
180-
<div className={styles.threadInfoProp}>Created by:</div>
181-
<div>{getFullname(thread.createdBy)}</div>
182-
<div className={styles.threadInfoProp}>Created at:</div>
183-
<div>{thread.createdAt.iso8601}</div>
197+
<div className={styles.title}>{thread.title}</div>
198+
<div className={styles.description}>{thread.description}</div>
199+
200+
<div className={styles.threadInfoGrid}>
201+
<div className={styles.threadInfoProp}>Opened by:</div>
202+
<div className={styles.threadInfoDesc}>
203+
{getFullname(thread.createdBy)}
204+
</div>
205+
206+
<div className={styles.threadInfoProp}>Opened:</div>
207+
<div className={styles.threadInfoDesc}>
208+
{thread.createdAt.iso8601}
209+
</div>
210+
211+
<div className={styles.threadInfoProp}>Last activity:</div>
212+
<div className={styles.threadInfoDesc}>
213+
{thread.updatedAt.iso8601}
214+
</div>
215+
216+
<div className={styles.threadInfoProp}>Status:</div>
217+
<div className={styles.threadInfoDesc}>
218+
In {thread.status.toLowerCase()} queue
219+
</div>
220+
221+
<div className={styles.threadInfoProp}>Priority:</div>
222+
<div className={styles.threadInfoDesc}>
223+
{getPriority(thread.priority)}
224+
</div>
225+
</div>
184226
</div>
185227
</main>
186228
</>

0 commit comments

Comments
 (0)