Skip to content

Commit

Permalink
feat: optimize table for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed May 10, 2020
1 parent d29747b commit e012cb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
7 changes: 5 additions & 2 deletions src/Schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const Countdown = ({
)
}

const formatTimezone = (tz: string) => tz.split('/')[1].replace('_', ' ')

export const Schedule = ({
conferenceDate,
eventTimezoneName,
Expand All @@ -52,19 +54,20 @@ export const Schedule = ({
const eventTime = toEventTime({ conferenceDate, userTimeZone })
const userTime = toUserTime({ conferenceDate, eventTimezoneName })
const userFormat = formatUserTime({ userTimeZone })

return (
<Table>
<thead>
<tr>
<th>
Conf Time
<br />
<small>{eventTimezoneName}</small>
<small>{formatTimezone(eventTimezoneName)}</small>
</th>
<th>
Your Time
<br />
<small>{userTimeZone}</small>
<small>{formatTimezone(userTimeZone)}</small>
</th>
<th>Starts in</th>
<th>Session</th>
Expand Down
8 changes: 0 additions & 8 deletions src/style/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ export const Table = styled.table`
font-size: 14px;
}
}
thead {
tr:first-child {
th {
font-size: 16px;
padding: 1rem;
}
}
}
td.time {
text-align: right;
width: 10%;
Expand Down

0 comments on commit e012cb5

Please sign in to comment.