Skip to content

Commit e012cb5

Browse files
committed
feat: optimize table for mobile
1 parent d29747b commit e012cb5

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/Schedule.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const Countdown = ({
3939
)
4040
}
4141

42+
const formatTimezone = (tz: string) => tz.split('/')[1].replace('_', ' ')
43+
4244
export const Schedule = ({
4345
conferenceDate,
4446
eventTimezoneName,
@@ -52,19 +54,20 @@ export const Schedule = ({
5254
const eventTime = toEventTime({ conferenceDate, userTimeZone })
5355
const userTime = toUserTime({ conferenceDate, eventTimezoneName })
5456
const userFormat = formatUserTime({ userTimeZone })
57+
5558
return (
5659
<Table>
5760
<thead>
5861
<tr>
5962
<th>
6063
Conf Time
6164
<br />
62-
<small>{eventTimezoneName}</small>
65+
<small>{formatTimezone(eventTimezoneName)}</small>
6366
</th>
6467
<th>
6568
Your Time
6669
<br />
67-
<small>{userTimeZone}</small>
70+
<small>{formatTimezone(userTimeZone)}</small>
6871
</th>
6972
<th>Starts in</th>
7073
<th>Session</th>

src/style/Table.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ export const Table = styled.table`
3333
font-size: 14px;
3434
}
3535
}
36-
thead {
37-
tr:first-child {
38-
th {
39-
font-size: 16px;
40-
padding: 1rem;
41-
}
42-
}
43-
}
4436
td.time {
4537
text-align: right;
4638
width: 10%;

0 commit comments

Comments
 (0)