Skip to content

Commit 50888ee

Browse files
authored
fix: move comment headers to top of comment groups (#478)
* fix: move comment headers to top of comment groups * style: schedule comment typography and spacing
1 parent 15191e9 commit 50888ee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/web/src/components/Schedule.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import MonthlySchedule from "./MonthlySchedule";
77
import { RRule } from "rrule";
88
import React from "react";
99
import { TResourceScheduleData } from "@upswyng/types";
10+
import Typography from "@material-ui/core/Typography";
1011

1112
interface ScheduleProps {
1213
schedule: TResourceScheduleData;
@@ -41,6 +42,11 @@ const Schedule = ({ schedule }: ScheduleProps) => {
4142
) as TScheduleItem[];
4243
return (
4344
<React.Fragment key={comment}>
45+
{comment !== "_no_comment_" && (
46+
<Grid item>
47+
<Typography variant="h3">{comment}</Typography>
48+
</Grid>
49+
)}
4450
{!!weeklyItems.length && (
4551
<Grid item>
4652
<WeeklySchedule items={weeklyItems} />
@@ -56,7 +62,6 @@ const Schedule = ({ schedule }: ScheduleProps) => {
5662
<MonthlySchedule items={monthlyItems} />
5763
</Grid>
5864
)}
59-
{comment !== "_no_comment_" && <div>{comment}</div>}
6065
</React.Fragment>
6166
);
6267
})}

0 commit comments

Comments
 (0)