From b7cb3d9768875b77f4212cf1adb33cb6fc3856b7 Mon Sep 17 00:00:00 2001 From: Manos Konstantinidis Date: Sun, 3 Oct 2021 16:43:11 +0100 Subject: [PATCH 1/2] Remove all read messages --- package.json | 1 - src/components/AllRead.test.tsx | 3 --- src/components/AllRead.tsx | 13 +------------ src/index.tsx | 1 + src/utils/constants.ts | 9 --------- yarn.lock | 9 +-------- 6 files changed, 3 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index 87ac41fc5..6a5ea291a 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/components/AllRead.test.tsx b/src/components/AllRead.test.tsx index 5e7115e81..a01b49e79 100644 --- a/src/components/AllRead.test.tsx +++ b/src/components/AllRead.test.tsx @@ -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(); diff --git a/src/components/AllRead.tsx b/src/components/AllRead.tsx index b58271508..964e3b170 100644 --- a/src/components/AllRead.tsx +++ b/src/components/AllRead.tsx @@ -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[ @@ -26,10 +17,8 @@ export const AllRead = () => {

{emojify(emoji, { output: 'unicode' })}

- {message} + No new notifications.

- -
No new notifications.
); }; diff --git a/src/index.tsx b/src/index.tsx index 877d941cf..e2928de11 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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'; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index c97d83b8d..8f9d2f55e 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -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:', diff --git a/yarn.lock b/yarn.lock index f4a638094..ffe5190b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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== @@ -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" From a42340ef09635f06bf31640d63d52270be9d90a3 Mon Sep 17 00:00:00 2001 From: Manos Konstantinidis Date: Sun, 3 Oct 2021 16:45:31 +0100 Subject: [PATCH 2/2] Fix tests --- src/components/__snapshots__/AllRead.test.tsx.snap | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/__snapshots__/AllRead.test.tsx.snap b/src/components/__snapshots__/AllRead.test.tsx.snap index 3b0db0c82..704062fd7 100644 --- a/src/components/__snapshots__/AllRead.test.tsx.snap +++ b/src/components/__snapshots__/AllRead.test.tsx.snap @@ -11,9 +11,8 @@ exports[`components/all-read.tsx should render itself & its children 1`] = `

-
+ > No new notifications. -
+

`;