Skip to content

Commit 20e80eb

Browse files
authored
Remove all read messages (#518)
* Remove all read messages * Fix tests
1 parent 1a11123 commit 20e80eb

File tree

7 files changed

+5
-36
lines changed

7 files changed

+5
-36
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
"react-final-form": "^6.4.0",
123123
"react-router-dom": "^5.2.0",
124124
"react-transition-group": "^4.4.1",
125-
"react-typist": "^2.0.5",
126125
"tailwindcss": "^2.0.2",
127126
"ts-loader": "^8.0.12",
128127
"typescript": "^4.1.3"

src/components/AllRead.test.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ import { Constants } from '../utils/constants';
44

55
import { AllRead } from './AllRead';
66

7-
jest.mock('react-typist');
8-
97
describe('components/all-read.tsx', function () {
108
it('should render itself & its children', function () {
119
spyOn(Constants, 'ALLREAD_EMOJIS');
12-
spyOn(Constants, 'ALLREAD_MESSAGES');
1310

1411
const tree = TestRenderer.create(<AllRead />);
1512

src/components/AllRead.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
import * as React from 'react';
2-
import Typist from 'react-typist';
32
import { emojify } from 'react-emojione';
43

54
import { Constants } from '../utils/constants';
65

76
export const AllRead = () => {
8-
const message = React.useMemo(
9-
() =>
10-
Constants.ALLREAD_MESSAGES[
11-
Math.floor(Math.random() * Constants.ALLREAD_MESSAGES.length)
12-
],
13-
[]
14-
);
15-
167
const emoji = React.useMemo(
178
() =>
189
Constants.ALLREAD_EMOJIS[
@@ -26,10 +17,8 @@ export const AllRead = () => {
2617
<h1 className="text-5xl mb-5">{emojify(emoji, { output: 'unicode' })}</h1>
2718

2819
<h2 className="font-semibold text-xl mb-2 text-semibold">
29-
<Typist>{message}</Typist>
20+
No new notifications.
3021
</h2>
31-
32-
<div>No new notifications.</div>
3322
</div>
3423
);
3524
};

src/components/__snapshots__/AllRead.test.tsx.snap

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ exports[`components/all-read.tsx should render itself & its children 1`] = `
1111
</h1>
1212
<h2
1313
className="font-semibold text-xl mb-2 text-semibold"
14-
/>
15-
<div>
14+
>
1615
No new notifications.
17-
</div>
16+
</h2>
1817
</div>
1918
`;

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33

44
import 'tailwindcss/tailwind.css';
5+
import 'nprogress/nprogress.css';
56

67
import { App } from './app';
78

src/utils/constants.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ export const Constants = {
1313
// Storage
1414
STORAGE_KEY: 'gitify-storage',
1515

16-
// Awesome all read messages
17-
ALLREAD_MESSAGES: [
18-
'Wow! You did it.',
19-
"That's amazing!",
20-
'Yes! All read.',
21-
'All gone! Nice work!',
22-
'Yay! Good news.',
23-
],
24-
2516
ALLREAD_EMOJIS: [
2617
':wink:',
2718
':tada:',

yarn.lock

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4944,7 +4944,7 @@ prompts@^2.0.1:
49444944
kleur "^3.0.3"
49454945
sisteransi "^1.0.4"
49464946

4947-
prop-types@^15.5.10, prop-types@^15.6.2:
4947+
prop-types@^15.6.2:
49484948
version "15.7.2"
49494949
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
49504950
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
@@ -5108,13 +5108,6 @@ react-transition-group@^4.4.1:
51085108
loose-envify "^1.4.0"
51095109
prop-types "^15.6.2"
51105110

5111-
react-typist@^2.0.5:
5112-
version "2.0.5"
5113-
resolved "https://registry.yarnpkg.com/react-typist/-/react-typist-2.0.5.tgz#9830395a73a03e6368e1392ecb98edaa3a648e44"
5114-
integrity sha512-iZCkeqeegO0TlkTMiH2JD1tvMtY9RrXkRylnAI6m8aCVAUUwNzoWTVF7CKLij6THeOMcUDCznLDDvNp55s+YZA==
5115-
dependencies:
5116-
prop-types "^15.5.10"
5117-
51185111
react@=16.13.1:
51195112
version "16.13.1"
51205113
resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e"

0 commit comments

Comments
 (0)