Skip to content

Commit fd70235

Browse files
Merge pull request #48 from ekonstantinidis/notification-commit
Support for Notifications' type "Commit"
2 parents 3ca6918 + 93f640d commit fd70235

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/js/__tests__/components/notification.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ describe('Test for Notification Component', function () {
170170
}
171171
},
172172
'subject': {
173-
'type': 'Issue',
173+
'type': 'Commit',
174174
'url': 'http://www.github.com/ekonstantinidis/gitify/pulls/26/'
175175
}
176176
};

src/js/components/notification.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
var React = require('react');
22
var remote = window.require('remote');
33
var shell = remote.require('shell');
4-
var _ = require('underscore');
54

6-
var AuthStore = require('../stores/auth');
75
var apiRequests = require('../utils/api-requests');
86

9-
var Notification = React.createClass({
7+
var NotificationItem = React.createClass({
108

119
getInitialState: function () {
1210
return {
@@ -49,6 +47,8 @@ var Notification = React.createClass({
4947
typeIconClass = 'octicon octicon-issue-opened';
5048
} else if (this.props.notification.subject.type == 'PullRequest') {
5149
typeIconClass = 'octicon octicon-git-pull-request';
50+
} else if (this.props.notification.subject.type == 'Commit') {
51+
typeIconClass = 'octicon octicon-git-commit';
5252
} else {
5353
typeIconClass = 'octicon octicon-question';
5454
}
@@ -67,4 +67,4 @@ var Notification = React.createClass({
6767
}
6868
});
6969

70-
module.exports = Notification;
70+
module.exports = NotificationItem;

0 commit comments

Comments
 (0)