Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lateness icon should show for college readings and homeworks #1587

Merged
merged 5 commits into from Feb 8, 2017

Conversation

pandafulmanda
Copy link
Contributor

@pandafulmanda pandafulmanda commented Feb 1, 2017

pass in isCollege for event row lateness icon logic -- lateness icon should show for both readings and homeworks, whereas they should not show for high school courses

High school late readings

screen shot 2017-02-01 at 12 59 53 pm

College late readings

screen shot 2017-02-01 at 1 00 11 pm

  • tests

…should show for both readings and homeworks, whereas they should not show for high school courses
else
<GenericEventRow courseId=@props.courseId key={event.id} event={event}/>
<GenericEventRow {...rowProps}/>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since all components are receiving the same props, how about just setting a variable with the component class in the switch, i.e.

Row = switch event.type
      when 'reading'  then ReadingRow
      when 'homework' then HomeworkRow
...

and then later render: <Row courseId={@props.courseId} ... >

@nathanstitt
Copy link
Member

Thanks @pandafulmanda !

@nathanstitt nathanstitt merged commit bc6009c into master Feb 8, 2017
@nathanstitt nathanstitt deleted the fix-task-lateness-icon branch February 8, 2017 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants