sforkowany z mirror/soapbox
configureStore: typescript conversion
rodzic
ac55adfcb3
commit
a91fe1db91
|
@ -1,14 +0,0 @@
|
||||||
import { createStore, applyMiddleware, compose } from 'redux';
|
|
||||||
import thunk from 'redux-thunk';
|
|
||||||
|
|
||||||
import errorsMiddleware from '../middleware/errors';
|
|
||||||
import soundsMiddleware from '../middleware/sounds';
|
|
||||||
import appReducer from '../reducers';
|
|
||||||
|
|
||||||
export default function configureStore() {
|
|
||||||
return createStore(appReducer, compose(applyMiddleware(
|
|
||||||
thunk,
|
|
||||||
errorsMiddleware(),
|
|
||||||
soundsMiddleware(),
|
|
||||||
), window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f));
|
|
||||||
}
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { composeWithDevTools } from '@redux-devtools/extension';
|
||||||
|
import { createStore, applyMiddleware } from 'redux';
|
||||||
|
import thunk from 'redux-thunk';
|
||||||
|
|
||||||
|
import errorsMiddleware from '../middleware/errors';
|
||||||
|
import soundsMiddleware from '../middleware/sounds';
|
||||||
|
import appReducer from '../reducers';
|
||||||
|
|
||||||
|
export default function configureStore() {
|
||||||
|
return createStore(
|
||||||
|
appReducer,
|
||||||
|
composeWithDevTools(
|
||||||
|
applyMiddleware(
|
||||||
|
thunk,
|
||||||
|
errorsMiddleware(),
|
||||||
|
soundsMiddleware(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
|
@ -54,11 +54,13 @@
|
||||||
"@gamestdio/websocket": "^0.3.2",
|
"@gamestdio/websocket": "^0.3.2",
|
||||||
"@lcdp/offline-plugin": "^5.1.0",
|
"@lcdp/offline-plugin": "^5.1.0",
|
||||||
"@popperjs/core": "^2.4.4",
|
"@popperjs/core": "^2.4.4",
|
||||||
|
"@redux-devtools/extension": "^3.2.2",
|
||||||
"@sentry/browser": "^6.12.0",
|
"@sentry/browser": "^6.12.0",
|
||||||
"@sentry/react": "^6.12.0",
|
"@sentry/react": "^6.12.0",
|
||||||
"@sentry/tracing": "^6.12.0",
|
"@sentry/tracing": "^6.12.0",
|
||||||
"@tabler/icons": "^1.53.0",
|
"@tabler/icons": "^1.53.0",
|
||||||
"@types/escape-html": "^1.0.1",
|
"@types/escape-html": "^1.0.1",
|
||||||
|
"@types/redux-immutable": "^4.0.2",
|
||||||
"array-includes": "^3.0.3",
|
"array-includes": "^3.0.3",
|
||||||
"autoprefixer": "^10.0.0",
|
"autoprefixer": "^10.0.0",
|
||||||
"axios": "^0.21.4",
|
"axios": "^0.21.4",
|
||||||
|
|
24
yarn.lock
24
yarn.lock
|
@ -1141,6 +1141,13 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
regenerator-runtime "^0.13.4"
|
regenerator-runtime "^0.13.4"
|
||||||
|
|
||||||
|
"@babel/runtime@^7.17.0":
|
||||||
|
version "7.17.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.7.tgz#a5f3328dc41ff39d803f311cfe17703418cf9825"
|
||||||
|
integrity sha512-L6rvG9GDxaLgFjg41K+5Yv9OMrU98sWe+Ykmc6FDJW/+vYZMhdOMKkISgzptMaERHvS2Y2lw9MDRm2gHhlQQoA==
|
||||||
|
dependencies:
|
||||||
|
regenerator-runtime "^0.13.4"
|
||||||
|
|
||||||
"@babel/template@7", "@babel/template@^7.16.7":
|
"@babel/template@7", "@babel/template@^7.16.7":
|
||||||
version "7.16.7"
|
version "7.16.7"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155"
|
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155"
|
||||||
|
@ -1600,6 +1607,13 @@
|
||||||
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.10.1.tgz#728ecd95ab207aab8a9a4e421f0422db329232be"
|
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.10.1.tgz#728ecd95ab207aab8a9a4e421f0422db329232be"
|
||||||
integrity sha512-HnUhk1Sy9IuKrxEMdIRCxpIqPw6BFsbYSEUO9p/hNw5sMld/+3OLMWQP80F8/db9qsv3qUjs7ZR5bS/R+iinXw==
|
integrity sha512-HnUhk1Sy9IuKrxEMdIRCxpIqPw6BFsbYSEUO9p/hNw5sMld/+3OLMWQP80F8/db9qsv3qUjs7ZR5bS/R+iinXw==
|
||||||
|
|
||||||
|
"@redux-devtools/extension@^3.2.2":
|
||||||
|
version "3.2.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@redux-devtools/extension/-/extension-3.2.2.tgz#2d6da4df2c4d32a0aac54d824e46f52b1fd9fc4d"
|
||||||
|
integrity sha512-fKA2TWNzJF7wXSDwBemwcagBFudaejXCzH5hRszN3Z6B7XEJtEmGD77AjV0wliZpIZjA/fs3U7CejFMQ+ipS7A==
|
||||||
|
dependencies:
|
||||||
|
"@babel/runtime" "^7.17.0"
|
||||||
|
|
||||||
"@sentry/browser@6.12.0", "@sentry/browser@^6.12.0":
|
"@sentry/browser@6.12.0", "@sentry/browser@^6.12.0":
|
||||||
version "6.12.0"
|
version "6.12.0"
|
||||||
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.12.0.tgz#970cd68fa117a1e1336fdb373e3b1fa76cd63e2d"
|
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.12.0.tgz#970cd68fa117a1e1336fdb373e3b1fa76cd63e2d"
|
||||||
|
@ -1897,6 +1911,14 @@
|
||||||
"@types/scheduler" "*"
|
"@types/scheduler" "*"
|
||||||
csstype "^3.0.2"
|
csstype "^3.0.2"
|
||||||
|
|
||||||
|
"@types/redux-immutable@^4.0.2":
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/redux-immutable/-/redux-immutable-4.0.2.tgz#8c3c666c33130c6794280bc3dc7726bfa0cfacc7"
|
||||||
|
integrity sha512-nlnhJn9B+NtIemWnnNWO9arUioeHLNvYCADSSa+48c81y8VwutgHH3WHobX711KKrfhlMlEz3+Q9SYX3sxrYPg==
|
||||||
|
dependencies:
|
||||||
|
immutable "^4.0.0-rc.1"
|
||||||
|
redux "^4.0.0"
|
||||||
|
|
||||||
"@types/retry@^0.12.0":
|
"@types/retry@^0.12.0":
|
||||||
version "0.12.1"
|
version "0.12.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065"
|
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065"
|
||||||
|
@ -5141,7 +5163,7 @@ immediate@~3.0.5:
|
||||||
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
|
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
|
||||||
integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=
|
integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=
|
||||||
|
|
||||||
immutable@^4.0.0:
|
immutable@^4.0.0, immutable@^4.0.0-rc.1:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0.tgz#b86f78de6adef3608395efb269a91462797e2c23"
|
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0.tgz#b86f78de6adef3608395efb269a91462797e2c23"
|
||||||
integrity sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==
|
integrity sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==
|
||||||
|
|
Ładowanie…
Reference in New Issue