Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
"react-final-form": "^6.4.0",
"react-router-dom": "^5.2.0",
"react-transition-group": "^4.4.1",
"react-typist": "^2.0.5",
"tailwindcss": "^2.0.2",
"ts-loader": "^8.0.12",
"typescript": "^4.1.3"
Expand Down
3 changes: 0 additions & 3 deletions src/components/AllRead.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ import { Constants } from '../utils/constants';

import { AllRead } from './AllRead';

jest.mock('react-typist');

describe('components/all-read.tsx', function () {
it('should render itself & its children', function () {
spyOn(Constants, 'ALLREAD_EMOJIS');
spyOn(Constants, 'ALLREAD_MESSAGES');

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

Expand Down
13 changes: 1 addition & 12 deletions src/components/AllRead.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
import * as React from 'react';
import Typist from 'react-typist';
import { emojify } from 'react-emojione';

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

export const AllRead = () => {
const message = React.useMemo(
() =>
Constants.ALLREAD_MESSAGES[
Math.floor(Math.random() * Constants.ALLREAD_MESSAGES.length)
],
[]
);

const emoji = React.useMemo(
() =>
Constants.ALLREAD_EMOJIS[
Expand All @@ -26,10 +17,8 @@ export const AllRead = () => {
<h1 className="text-5xl mb-5">{emojify(emoji, { output: 'unicode' })}</h1>

<h2 className="font-semibold text-xl mb-2 text-semibold">
<Typist>{message}</Typist>
No new notifications.
</h2>

<div>No new notifications.</div>
</div>
);
};
5 changes: 2 additions & 3 deletions src/components/__snapshots__/AllRead.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ exports[`components/all-read.tsx should render itself & its children 1`] = `
</h1>
<h2
className="font-semibold text-xl mb-2 text-semibold"
/>
<div>
>
No new notifications.
</div>
</h2>
</div>
`;
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react';
import * as ReactDOM from 'react-dom';

import 'tailwindcss/tailwind.css';
import 'nprogress/nprogress.css';

import { App } from './app';

Expand Down
9 changes: 0 additions & 9 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ export const Constants = {
// Storage
STORAGE_KEY: 'gitify-storage',

// Awesome all read messages
ALLREAD_MESSAGES: [
'Wow! You did it.',
"That's amazing!",
'Yes! All read.',
'All gone! Nice work!',
'Yay! Good news.',
],

ALLREAD_EMOJIS: [
':wink:',
':tada:',
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4944,7 +4944,7 @@ prompts@^2.0.1:
kleur "^3.0.3"
sisteransi "^1.0.4"

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

react-typist@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/react-typist/-/react-typist-2.0.5.tgz#9830395a73a03e6368e1392ecb98edaa3a648e44"
integrity sha512-iZCkeqeegO0TlkTMiH2JD1tvMtY9RrXkRylnAI6m8aCVAUUwNzoWTVF7CKLij6THeOMcUDCznLDDvNp55s+YZA==
dependencies:
prop-types "^15.5.10"

react@=16.13.1:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e"
Expand Down