From 67cb0c4bbd14239ef3e9524c143c799c256ab39a Mon Sep 17 00:00:00 2001 From: Amir Fefer Date: Mon, 7 Aug 2023 18:10:46 +0300 Subject: [PATCH] build: remove sample page and unused packages --- package-lock.json | 103 +++++++++---------- package.json | 5 - src/App.js | 31 +----- src/AppEntry.js | 13 +-- src/Routes.js | 32 ------ src/Routes/SamplePage/SamplePage.js | 124 ----------------------- src/Routes/SamplePage/SamplePage.test.js | 14 --- src/Routes/SamplePage/sample-page.scss | 2 - src/store/index.js | 18 ---- 9 files changed, 52 insertions(+), 290 deletions(-) delete mode 100644 src/Routes.js delete mode 100644 src/Routes/SamplePage/SamplePage.js delete mode 100644 src/Routes/SamplePage/SamplePage.test.js delete mode 100644 src/Routes/SamplePage/sample-page.scss delete mode 100644 src/store/index.js diff --git a/package-lock.json b/package-lock.json index 5e1ca590..ca20d7d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,12 +18,7 @@ "react": "17.0.2", "react-dom": "17.0.2", "react-query": "^3.39.2", - "react-redux": "8.0.2", - "react-router-dom": "5.2.0", "react-tracked": "^1.7.10", - "redux": "4.2.0", - "redux-logger": "3.0.6", - "redux-promise-middleware": "6.1.2", "uuid": "^9.0.0" }, "devDependencies": { @@ -3893,6 +3888,7 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "peer": true, "dependencies": { "@types/react": "*", "hoist-non-react-statics": "^3.3.0" @@ -4156,7 +4152,8 @@ "node_modules/@types/use-sync-external-store": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", - "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==", + "peer": true }, "node_modules/@types/webpack": { "version": "4.41.29", @@ -7022,11 +7019,6 @@ "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", "dev": true }, - "node_modules/deep-diff": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", - "integrity": "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" - }, "node_modules/deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -9275,6 +9267,7 @@ "version": "4.10.1", "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "peer": true, "dependencies": { "@babel/runtime": "^7.1.2", "loose-envify": "^1.2.0", @@ -9288,6 +9281,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "peer": true, "dependencies": { "react-is": "^16.7.0" } @@ -10445,7 +10439,8 @@ "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "peer": true }, "node_modules/isexe": { "version": "2.0.0", @@ -13139,6 +13134,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==", + "peer": true, "dependencies": { "@babel/runtime": "^7.12.1", "tiny-warning": "^1.0.3" @@ -14331,6 +14327,7 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "peer": true, "dependencies": { "isarray": "0.0.1" } @@ -15153,6 +15150,7 @@ "version": "8.0.2", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.2.tgz", "integrity": "sha512-nBwiscMw3NoP59NFCXFf02f8xdo+vSHT/uZ1ldDwF7XaTpzm+Phk97VT4urYBl5TYAPNVaFm12UHAEyzkpNzRA==", + "peer": true, "dependencies": { "@babel/runtime": "^7.12.1", "@types/hoist-non-react-statics": "^3.3.1", @@ -15190,7 +15188,8 @@ "node_modules/react-redux/node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "peer": true }, "node_modules/react-refresh": { "version": "0.14.0", @@ -15205,6 +15204,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz", "integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==", + "peer": true, "dependencies": { "@babel/runtime": "^7.1.2", "history": "^4.9.0", @@ -15225,6 +15225,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz", "integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==", + "peer": true, "dependencies": { "@babel/runtime": "^7.1.2", "history": "^4.9.0", @@ -15382,23 +15383,11 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", + "peer": true, "dependencies": { "@babel/runtime": "^7.9.2" } }, - "node_modules/redux-logger": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", - "integrity": "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=", - "dependencies": { - "deep-diff": "^0.3.5" - } - }, - "node_modules/redux-promise-middleware": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/redux-promise-middleware/-/redux-promise-middleware-6.1.2.tgz", - "integrity": "sha512-ZqZu/nnSzGgwTtNbGoGVontpk7LjTOv0kigtt3CcgXI9gpq+8WlfXTXRZD0WTD5yaohRq0q2nYmJXSTjwXs83Q==" - }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -15630,7 +15619,8 @@ "node_modules/resolve-pathname": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", - "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==", + "peer": true }, "node_modules/restore-cursor": { "version": "3.1.0", @@ -17152,12 +17142,14 @@ "node_modules/tiny-invariant": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.2.0.tgz", - "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==" + "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==", + "peer": true }, "node_modules/tiny-warning": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", - "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", + "peer": true }, "node_modules/tippy.js": { "version": "5.1.2", @@ -17706,6 +17698,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peer": true, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } @@ -17795,7 +17788,8 @@ "node_modules/value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", - "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==", + "peer": true }, "node_modules/vary": { "version": "1.1.2", @@ -21668,6 +21662,7 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "peer": true, "requires": { "@types/react": "*", "hoist-non-react-statics": "^3.3.0" @@ -21931,7 +21926,8 @@ "@types/use-sync-external-store": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", - "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==", + "peer": true }, "@types/webpack": { "version": "4.41.29", @@ -24175,11 +24171,6 @@ "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", "dev": true }, - "deep-diff": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", - "integrity": "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -25907,6 +25898,7 @@ "version": "4.10.1", "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "peer": true, "requires": { "@babel/runtime": "^7.1.2", "loose-envify": "^1.2.0", @@ -25920,6 +25912,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "peer": true, "requires": { "react-is": "^16.7.0" } @@ -26791,7 +26784,8 @@ "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "peer": true }, "isexe": { "version": "2.0.0", @@ -28962,6 +28956,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==", + "peer": true, "requires": { "@babel/runtime": "^7.12.1", "tiny-warning": "^1.0.3" @@ -29880,6 +29875,7 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "peer": true, "requires": { "isarray": "0.0.1" } @@ -30532,6 +30528,7 @@ "version": "8.0.2", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.2.tgz", "integrity": "sha512-nBwiscMw3NoP59NFCXFf02f8xdo+vSHT/uZ1ldDwF7XaTpzm+Phk97VT4urYBl5TYAPNVaFm12UHAEyzkpNzRA==", + "peer": true, "requires": { "@babel/runtime": "^7.12.1", "@types/hoist-non-react-statics": "^3.3.1", @@ -30544,7 +30541,8 @@ "react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "peer": true } } }, @@ -30558,6 +30556,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz", "integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==", + "peer": true, "requires": { "@babel/runtime": "^7.1.2", "history": "^4.9.0", @@ -30575,6 +30574,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz", "integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==", + "peer": true, "requires": { "@babel/runtime": "^7.1.2", "history": "^4.9.0", @@ -30684,23 +30684,11 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", + "peer": true, "requires": { "@babel/runtime": "^7.9.2" } }, - "redux-logger": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", - "integrity": "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=", - "requires": { - "deep-diff": "^0.3.5" - } - }, - "redux-promise-middleware": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/redux-promise-middleware/-/redux-promise-middleware-6.1.2.tgz", - "integrity": "sha512-ZqZu/nnSzGgwTtNbGoGVontpk7LjTOv0kigtt3CcgXI9gpq+8WlfXTXRZD0WTD5yaohRq0q2nYmJXSTjwXs83Q==" - }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -30892,7 +30880,8 @@ "resolve-pathname": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", - "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==", + "peer": true }, "restore-cursor": { "version": "3.1.0", @@ -32151,12 +32140,14 @@ "tiny-invariant": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.2.0.tgz", - "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==" + "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==", + "peer": true }, "tiny-warning": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", - "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", + "peer": true }, "tippy.js": { "version": "5.1.2", @@ -32578,6 +32569,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peer": true, "requires": {} }, "util": { @@ -32655,7 +32647,8 @@ "value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", - "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==", + "peer": true }, "vary": { "version": "1.1.2", diff --git a/package.json b/package.json index b6302493..4fcffcb1 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,7 @@ "react": "17.0.2", "react-dom": "17.0.2", "react-query": "^3.39.2", - "react-redux": "8.0.2", - "react-router-dom": "5.2.0", "react-tracked": "^1.7.10", - "redux": "4.2.0", - "redux-logger": "3.0.6", - "redux-promise-middleware": "6.1.2", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/src/App.js b/src/App.js index f6635b29..846b485d 100644 --- a/src/App.js +++ b/src/App.js @@ -1,33 +1,8 @@ -import React, { Fragment, useEffect } from 'react'; -import { useHistory } from 'react-router-dom'; -import { Routes } from './Routes'; +import React, { Fragment } from 'react'; import './App.scss'; -import { getRegistry } from '@redhat-cloud-services/frontend-components-utilities/Registry'; -import NotificationsPortal from '@redhat-cloud-services/frontend-components-notifications/NotificationPortal'; -import { notificationsReducer } from '@redhat-cloud-services/frontend-components-notifications/redux'; -import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'; - -const App = (props) => { - const history = useHistory(); - const { on: onChromeEvent } = useChrome(); - - useEffect(() => { - const registry = getRegistry(); - const unregister = onChromeEvent('APP_NAVIGATION', (event) => history.push(`/${event.navId}`)); - registry.register({ notifications: notificationsReducer }); - - return () => { - unregister?.(); - }; - }, []); - - return ( - - - - - ); +const App = () => { + return ; }; export default App; diff --git a/src/AppEntry.js b/src/AppEntry.js index ccacadb6..5e5ff70d 100644 --- a/src/AppEntry.js +++ b/src/AppEntry.js @@ -1,17 +1,6 @@ import React from 'react'; -import { BrowserRouter as Router } from 'react-router-dom'; -import { Provider } from 'react-redux'; -import { init } from './store'; import App from './App'; -import { getBaseName } from '@redhat-cloud-services/frontend-components-utilities/helpers'; -import logger from 'redux-logger'; -const AppEntry = () => ( - - - - - -); +const AppEntry = () => ; export default AppEntry; diff --git a/src/Routes.js b/src/Routes.js deleted file mode 100644 index 85f94e91..00000000 --- a/src/Routes.js +++ /dev/null @@ -1,32 +0,0 @@ -import React, { Suspense, lazy } from 'react'; -import { Redirect, Route, Switch } from 'react-router-dom'; - -import { Bullseye, Spinner } from '@patternfly/react-core'; - -const SamplePage = lazy(() => import(/* webpackChunkName: "SamplePage" */ './Routes/SamplePage/SamplePage')); - -/** - * the Switch component changes routes depending on the path. - * - * Route properties: - * exact - path must match exactly, - * path - https://prod.foo.redhat.com:1337/insights/advisor/rules - * component - component to be rendered when a route has been chosen. - */ -export const Routes = () => ( - - - - } - > - - - {/* Finally, catch all unmatched routes */} - - - - - -); diff --git a/src/Routes/SamplePage/SamplePage.js b/src/Routes/SamplePage/SamplePage.js deleted file mode 100644 index 0993e519..00000000 --- a/src/Routes/SamplePage/SamplePage.js +++ /dev/null @@ -1,124 +0,0 @@ -import React, { useEffect } from 'react'; -import { withRouter } from 'react-router-dom'; - -import { Button, GridItem, Grid, Title, FormGroup, TextInput, Select, SelectOption, SelectVariant } from '@patternfly/react-core'; -import { PageHeader, PageHeaderTitle } from '@redhat-cloud-services/frontend-components/PageHeader'; -import axios from 'axios'; - -import './sample-page.scss'; -import ProvisioningWizard from '../../Components/ProvisioningWizard'; -import { AWS_PROVIDER, AZURE_PROVIDER } from '../../constants'; - -/** -This page demonstrates the provisioning UI wizard - */ - -// This default AMI value is taken when no image builder api found -const IMAGE_BUILDER_URL = '/api/image-builder/v1/composes'; - -export const SamplePage = () => { - const [isWizardOpen, setWizardModal] = React.useState(false); - const [images, setImages] = React.useState([]); - const [chosenImage, setChosenImage] = React.useState({ - isTesting: true, - id: undefined, - name: undefined, - provider: AWS_PROVIDER, - architecture: undefined, - }); - const [isImageSelectOpen, setImageSelect] = React.useState(false); - const [isProviderSelectOpen, setProviderSelectOpen] = React.useState(false); - - useEffect(() => { - const fetchImagesFromIB = async () => { - try { - const { data } = await axios.get(IMAGE_BUILDER_URL); - setImages(data?.data); - } catch (e) { - console.debug('No image builder api has been found'); - setImages(false); - } - }; - - fetchImagesFromIB(); - }, []); - - const onImageSelectionToggle = (isOpen) => { - setImageSelect(isOpen); - }; - - const onImageSelect = (event, selection, isPlaceholder) => { - if (isPlaceholder) return; - const { id, request } = images.find((image) => image.image_name === selection); - const { architecture, image_type } = request.image_requests[0]; - setChosenImage({ isTesting: true, id: id, name: selection, architecture: architecture, provider: image_type }); - setImageSelect(false); - }; - - const onInputChange = (value) => { - setChosenImage({ ...chosenImage, id: value, name: 'manualy entered AMI', architecture: 'x86_64' }); - }; - const onProviderSelect = (evt, value) => { - setChosenImage({ ...chosenImage, provider: value }); - setProviderSelectOpen(false); - }; - - const renderSelect = (images) => ( - - ); - - return ( - - - -

Provisioning Demo

-
- - {images && {renderSelect(images)}} - - - - - - - - - - - - - - {isWizardOpen && setWizardModal(false)} image={chosenImage} />} - - -
- ); -}; - -export default withRouter(SamplePage); diff --git a/src/Routes/SamplePage/SamplePage.test.js b/src/Routes/SamplePage/SamplePage.test.js deleted file mode 100644 index 73622602..00000000 --- a/src/Routes/SamplePage/SamplePage.test.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { SamplePage } from './SamplePage'; -import userEvent from '@testing-library/user-event'; -import { render, screen } from '../../mocks/utils'; - -describe('SamplePage', () => { - test('wizard is open correctly', async () => { - render(); - const image = await screen.findByLabelText('manual ami'); - await userEvent.type(image, 'ami-123456'); - await userEvent.click(screen.getByText('Open Wizard')); - await screen.findByText('Account and customizations | Amazon'); - }); -}); diff --git a/src/Routes/SamplePage/sample-page.scss b/src/Routes/SamplePage/sample-page.scss deleted file mode 100644 index 217d3877..00000000 --- a/src/Routes/SamplePage/sample-page.scss +++ /dev/null @@ -1,2 +0,0 @@ -// js generates class '.page__{rootClass}' that wraps the content in your page added to the root tag -// Found in Routes.js as the rootClass diff --git a/src/store/index.js b/src/store/index.js deleted file mode 100644 index ae666a2e..00000000 --- a/src/store/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import { getRegistry } from '@redhat-cloud-services/frontend-components-utilities/Registry'; -import promiseMiddleware from 'redux-promise-middleware'; -import notificationsMiddleware from '@redhat-cloud-services/frontend-components-notifications/notificationsMiddleware'; - -let registry; - -export function init(...middleware) { - registry = getRegistry({}, [promiseMiddleware, notificationsMiddleware({ errorDescriptionKey: ['detail', 'stack'] }), ...middleware]); - return registry; -} - -export function getStore() { - return registry.getStore(); -} - -export function register(...args) { - return registry.register(...args); -}