Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/43/use alienstore #45

Merged
merged 125 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
bc34482
style(dynostore): add temporary type for 'reloadStore'
aneurysmjs Oct 9, 2019
a7d6f65
style(example): add return type
aneurysmjs Oct 9, 2019
e5b1670
Merge branch 'master' into issue/43/use-dynostore
aneurysmjs Oct 9, 2019
e4f8996
refactor(*): favor destructuring for React's types
aneurysmjs Oct 9, 2019
e941284
improvement(global.d): extend NodeModule by adding "hot" property
aneurysmjs Oct 10, 2019
805178b
improvement(types): add types for the whole store
aneurysmjs Oct 10, 2019
62079f7
feat(store): set first draft architecture for Dyno Store
aneurysmjs Oct 10, 2019
f957a14
refactor(products/types): fix types for ProductsStateType
aneurysmjs Oct 10, 2019
99afdc1
improvement(store): use "createStore" from dynoStore
aneurysmjs Oct 10, 2019
2d0116e
improvement(routing): use "withStoreModule" to inject reducer dynamic…
aneurysmjs Oct 10, 2019
d9e51fe
refactor(store/index.tsx): use dynoStore's reloadStore
aneurysmjs Oct 10, 2019
cdfc2a3
improvement(getproducts): use ProductsStateType
aneurysmjs Oct 10, 2019
57eb087
test(dynostore): add tests
aneurysmjs Oct 12, 2019
3e42c20
refactor(dynostore): handle import promises on "withStoreModule"
aneurysmjs Oct 12, 2019
6b4d1d5
test(dynostore): fix test by use correct name of dynoStore
aneurysmjs Oct 12, 2019
182f8fe
refactor(shared/types): remove Cart
aneurysmjs Oct 13, 2019
c12ef79
improvement(modules/cart): set store module pattern
aneurysmjs Oct 16, 2019
8ae2d1f
refactor(store/config): rename dynoStore to alienStore
aneurysmjs Oct 17, 2019
a88bddf
test(alienstore): update test unde alienStore alias and actions
aneurysmjs Oct 17, 2019
250cca3
refactor(shared/actions): remove Cart and Product action types
aneurysmjs Oct 17, 2019
c985b7e
refactor(alienstore): displat reload store action ONLY in production
aneurysmjs Oct 17, 2019
0b90696
chore(deps): install @testing-library/react-hooks
aneurysmjs Oct 17, 2019
bce2d50
feat(alienstore): add useAlienModule hook
aneurysmjs Oct 17, 2019
dfc743c
refactor(configurestore): replace import with alienstore
aneurysmjs Oct 17, 2019
30b81ef
refactor(routing): replace import with alienstore
aneurysmjs Oct 17, 2019
163e73b
refactor(store/index): replace import path with alienstore
aneurysmjs Oct 17, 2019
36d56dd
improvement(shared/types): add valueof
aneurysmjs Oct 17, 2019
5b45e1f
test(alienstore): fix test by properly resolve promise
aneurysmjs Oct 18, 2019
328b6f1
test(alienstore): improve testing by handle exceptions
aneurysmjs Oct 21, 2019
0de7684
test(alienstore): create WRONG_COMPONENT_PATH generalized path
aneurysmjs Oct 22, 2019
5930895
feat(alienstore): add initialReducers and prevent reducer duplication
aneurysmjs Nov 3, 2019
5f5f881
fix(alienstore): improve useAlienModule
aneurysmjs Nov 3, 2019
047827a
refactor(configurestore): pass undefined as first parameter of create…
aneurysmjs Nov 3, 2019
6b3becf
refactor(types/index.tsx): stablish initial reducer constant
aneurysmjs Nov 3, 2019
77a435a
test(alienstore): test for createStore method
aneurysmjs Nov 4, 2019
e924018
feat(alienstore): add getReducerMap method
aneurysmjs Nov 4, 2019
8fae08c
feat(alienstore): add removeReducers method
aneurysmjs Nov 4, 2019
965990c
fix(alienstore): add removeReducers on index
aneurysmjs Nov 4, 2019
75a3d45
improvement(modules/footer): add index.ts
aneurysmjs Nov 5, 2019
49a4e50
refactor(modules/cart): replace .tsx for .ts
aneurysmjs Nov 5, 2019
bcf6c30
improvement(alienstore): initial rewriting API
aneurysmjs Nov 13, 2019
dec229c
feat(alien): add useAlien hook
aneurysmjs Nov 15, 2019
b85e6c0
refactor(configurestore): use new alien
aneurysmjs Nov 16, 2019
1799ccc
refactor(usealien): remove the use of default imports
aneurysmjs Nov 16, 2019
14391c4
refactor(routing): remove the use of 'withStoreModule'
aneurysmjs Nov 16, 2019
b1de20a
improvement(store/modules/products): add index file
aneurysmjs Nov 17, 2019
5f9395f
refactor(alienstore): export only alien and useAlien
aneurysmjs Nov 17, 2019
eb70aa9
feat(manager): add 'setDispatch' method
aneurysmjs Dec 1, 2019
0a0d697
improvement(alien): set dispatch from store
aneurysmjs Dec 1, 2019
680a347
refactor(usealien): remove direct store.dispatch call
aneurysmjs Dec 1, 2019
76f8cd2
test(manager): add test for 'removeReducers' method
aneurysmjs Dec 2, 2019
04d6ce5
refactor(alienstore): remove old alienStore code
aneurysmjs Dec 2, 2019
5a127c0
refactor(alienstore): remove dynoStore
aneurysmjs Dec 2, 2019
70c1f1e
improvement(usealien): improve errorHandler
aneurysmjs Dec 2, 2019
e545616
style(usealien.test): apply correct typing
aneurysmjs Dec 2, 2019
6975d48
refactor(usealien): pass object as an alien module
aneurysmjs Dec 2, 2019
985caef
improvement(usealien): return action creators map as a result
aneurysmjs Dec 2, 2019
5ef5c0b
refactor(usealien): use more proper names for variable and types
aneurysmjs Dec 4, 2019
b6f3a7c
refactor(usealien): reduce AlienResult's boilerplate
aneurysmjs Dec 6, 2019
2869ef1
feat(alien): add withAlien higher-order hook
aneurysmjs Dec 8, 2019
ba30626
improvement(withalien): apply typings from useAlien
aneurysmjs Dec 9, 2019
61b0646
improvement(withalien): use function expression for Component param
aneurysmjs Dec 10, 2019
e44b566
improvement(withalien): do not return null while resolving Redux module
aneurysmjs Dec 11, 2019
10533a2
fix(withalien): return component when ReduxModule is resolve
aneurysmjs Dec 31, 2019
0bcd87b
refactor(products): rename index to products.module
aneurysmjs Jan 2, 2020
8299e56
improvement(alienstore): create helpers for tests
aneurysmjs Jan 5, 2020
5dd3e33
improvement(alienstore): create modules helper
aneurysmjs Jan 5, 2020
8d1425f
style(helpers/modules): improve typing
aneurysmjs Jan 5, 2020
e58b0ae
improvement(alienstore): extract withProvider in its own file
aneurysmjs Jan 5, 2020
8d4ccec
refactor(withalien): use withProvider and reduxModule helpers
aneurysmjs Jan 5, 2020
0ffd413
chore(deps): upgrade react and react-dom with its types
aneurysmjs Jan 5, 2020
93ad5eb
chore(deps): upgrade redux and react-redux
aneurysmjs Jan 5, 2020
b918752
test(jest): set testEnvironment to jsdom
aneurysmjs Jan 5, 2020
607d68b
chore(deps): upgrade eslint and @typescript-eslint
aneurysmjs Jan 6, 2020
0b697b9
chore(eslint): disable import/extensions rule
aneurysmjs Jan 6, 2020
3c7454f
chore(eslint): disable @typescript-eslint/no-empty-function
aneurysmjs Jan 6, 2020
3546dda
refactor(modules/footer): rename to footer.module
aneurysmjs Jan 6, 2020
73dc52e
refactor(create alienstore types): move FullStoreShape, ReducerMapper…
aneurysmjs Jan 7, 2020
2b633df
improvement(routing): remove withAlien logic
aneurysmjs Jan 7, 2020
5ae24b5
feat(usealien): make the use of id for a redux module
aneurysmjs Jan 8, 2020
ac9cb56
fix(products.module): add missing id property
aneurysmjs Jan 8, 2020
425759b
improvement(usealien): throw when redux module has no reducers
aneurysmjs Jan 8, 2020
4bf6ee7
feat(usealien): call a callback when unmounting
aneurysmjs Jan 9, 2020
ccc3158
refactor(usealien): throw when Alien module has no "id" and not Redux…
aneurysmjs Jan 9, 2020
fde8b3b
improvement(usealien): thrown when alienModule has empty string as an id
aneurysmjs Jan 11, 2020
d25f368
fix(withalien): pass alienModule
aneurysmjs Jan 12, 2020
98d2142
feat(usealien): receive and array of alienModules instead of a single…
aneurysmjs Jan 13, 2020
4d32e8f
improvement(usealien): improve result when resolving multiple modules
aneurysmjs Jan 15, 2020
2ceb9f8
refactor(uselazy): take and array of imports instead of Alien modules
aneurysmjs Jan 24, 2020
65a9d65
refactor(usealien): change shape result
aneurysmjs Jan 26, 2020
4671e46
test(uselazy): order all redux modules import
aneurysmjs Jan 27, 2020
d8bf253
refactor(uselazy): return an array of alien modules
aneurysmjs Jan 27, 2020
89f2ac5
refactor(withalien): align with useAlien usage
aneurysmjs Jan 27, 2020
31bb2de
refactor(helper/modules): comment selector's return type
aneurysmjs Jan 28, 2020
c897978
improvement(withalien): fix typing when resolving redux modules
aneurysmjs Jan 28, 2020
67aee80
chore(deps): upgrade eslint-config-prettier
aneurysmjs Jan 28, 2020
9098551
chore(eslint): resolve style conflicts with prettier
aneurysmjs Jan 28, 2020
c7a4b88
refactor(shared/types): move State into store
aneurysmjs Feb 2, 2020
16f8298
fix(products.module): add mising id
aneurysmjs Feb 2, 2020
d58c420
chore(deps): upgrade types/react and types/react-dom
aneurysmjs Feb 4, 2020
0207eb1
chore(deps): upgrade @types/react-redux
aneurysmjs Feb 4, 2020
b8d107a
improvement(usealien): improve ReduxModule's typing
aneurysmjs Feb 4, 2020
0632500
fix(state): type with ProductsStateType instead of Products
aneurysmjs Feb 4, 2020
508c1e3
improvement(home): use Webpack's magic comment
aneurysmjs Feb 4, 2020
2c99e38
improvement(icon): use Webpack's magic comments
aneurysmjs Feb 4, 2020
1319cbb
improvement(home): improve typing
aneurysmjs Feb 4, 2020
6866926
improvement(*): improve typing for products and namings
aneurysmjs Feb 6, 2020
9f1ee8c
improvement(*): connect footer's state through withAlien
aneurysmjs Feb 6, 2020
57f4b18
improvement(*): connect UserMenu with Cart through withAlien
aneurysmjs Feb 6, 2020
c659d3f
fix(*): fix Footer and Products
aneurysmjs Feb 6, 2020
b95ff78
refactor(icon): remove space from webpack's magic comment
aneurysmjs Feb 6, 2020
abf773c
refactor(middlewares/logger): use Redux's AnyAction type
aneurysmjs Feb 6, 2020
23cbfa8
refactor(store): remove helpers
aneurysmjs Feb 6, 2020
734c544
test(fetchproducts): fix initial state
aneurysmjs Feb 7, 2020
5b8fd4c
test(*): replace 'act'
aneurysmjs Feb 9, 2020
642a597
improvement(utils/testing): create renderFromAlien
aneurysmjs Feb 10, 2020
54dd482
refactor(footer/index): export directly withAlien's result
aneurysmjs Feb 10, 2020
a5a272f
test(footer): update test by using "renderFromAlien"
aneurysmjs Feb 10, 2020
e4bda79
fix(renderfromalien): remove unused inmports
aneurysmjs Feb 10, 2020
5c74d8a
test(usermenu): upgrade test by using "renderFromAlien"
aneurysmjs Feb 10, 2020
f0aa864
test(header): upgrade test by using withProvider
aneurysmjs Feb 10, 2020
e853320
test(imgloader): use 'act' from '@testing-library/react'
aneurysmjs Feb 10, 2020
1ae8495
improvement(usealien): add generic type AlienResult
aneurysmjs Feb 10, 2020
09f1415
improvement(renderfromalien): use "act" from @testing-library/react-h…
aneurysmjs Feb 10, 2020
97c9845
test(home): use renderFromAlien
aneurysmjs Feb 10, 2020
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
16 changes: 11 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
// Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
"plugin:import/typescript",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"plugins": [
"import",
Expand All @@ -39,7 +39,6 @@
"sourceType": "module" // Allows for the use of imports
},
"rules": {
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/explicit-function-return-type": ["error", {
// "allowExpressions": true,
"allowTypedFunctionExpressions": true
Expand All @@ -53,6 +52,13 @@
{
"devDependencies": true
}
]
],
"import/extensions": [
2,
{
"scss": "always"
}
],
"@typescript-eslint/no-empty-function": "off"
}
}
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
'<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs,ts,tsx}',
'<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs,ts,tsx}',
],
testEnvironment: 'node',
testEnvironment: 'jsdom',
testURL: 'http://localhost',
modulePaths: ['src'],
moduleNameMapper: {
Expand Down
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@loadable/babel-plugin": "5.10.3",
"@loadable/webpack-plugin": "5.7.1",
"@testing-library/react": "9.3.0",
"@testing-library/react-hooks": "3.1.0",
"@types/axios": "0.14.0",
"@types/cors": "2.8.6",
"@types/express": "4.17.1",
Expand All @@ -59,15 +60,15 @@
"@types/loadable__server": "5.9.1",
"@types/node": "12.7.12",
"@types/ramda": "0.26.28",
"@types/react": "16.9.5",
"@types/react-dom": "16.9.1",
"@types/react": "16.9.19",
"@types/react-dom": "16.9.5",
"@types/react-helmet": "5.0.11",
"@types/react-redux": "7.1.4",
"@types/react-router-dom": "5.1.0",
"@types/react-redux": "7.1.7",
"@types/react-router-dom": "5.1.3",
"@types/redux-mock-store": "1.0.1",
"@types/testing-library__react": "9.1.2",
"@typescript-eslint/eslint-plugin": "2.3.3",
"@typescript-eslint/parser": "2.3.3",
"@typescript-eslint/eslint-plugin": "2.14.0",
"@typescript-eslint/parser": "2.14.0",
"autoprefixer": "9.6.4",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.3",
Expand All @@ -86,18 +87,17 @@
"cz-conventional-changelog": "3.0.2",
"dotenv": "8.1.0",
"escape-string-regexp": "2.0.0",
"eslint": "6.5.1",
"eslint": "6.8.0",
"eslint-config-airbnb-base": "14.0.0",
"eslint-config-prettier": "6.3.0",
"eslint-import-resolver-webpack": "0.11.1",
"eslint-loader": "3.0.2",
"eslint-config-prettier": "6.10.0",
"eslint-import-resolver-webpack": "0.12.0",
"eslint-loader": "3.0.3",
"eslint-plugin-class-property": "1.1.0",
"eslint-plugin-flowtype": "4.3.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-import": "2.19.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "3.1.1",
"eslint-plugin-react": "7.16.0",
"eslint-plugin-react-hooks": "2.1.2",
"eslint-plugin-prettier": "3.1.2",
"eslint-plugin-react": "7.17.0",
"eslint-plugin-react-hooks": "2.3.0",
"express": "4.17.1",
"express-manifest-helpers": "0.6.0",
"file-loader": "4.2.0",
Expand Down Expand Up @@ -126,7 +126,7 @@
"sass-loader": "8.0.0",
"semantic-release": "15.13.24",
"style-loader": "1.0.0",
"typescript": "3.6.3",
"typescript": "3.7.4",
"url-loader": "2.2.0",
"webpack": "4.41.0",
"webpack-bundle-analyzer": "3.5.2",
Expand All @@ -149,13 +149,13 @@
"lodash.throttle": "4.1.1",
"node-uuid": "1.4.8",
"ramda": "0.26.1",
"react": "16.10.1",
"react-dom": "16.10.1",
"react": "16.12.0",
"react-dom": "16.12.0",
"react-helmet": "5.2.1",
"react-redux": "7.1.1",
"react-redux": "7.1.3",
"react-router": "5.1.2",
"react-router-dom": "5.1.2",
"redux": "4.0.4",
"redux": "4.0.5",
"redux-thunk": "2.3.0"
}
}
4 changes: 2 additions & 2 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import React, { ReactElement } from 'react';

import Routing from '~/components/routing';

import './assets/scss/styles.scss';

const App = (): React.ReactElement => <Routing />;
const App = (): ReactElement => <Routing />;

export default App;
2 changes: 1 addition & 1 deletion src/app/components/base/Icon/Icon.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/ban-ts-ignore */
import React from 'react';
import { act } from 'react-dom/test-utils';
import { act } from 'react-test-renderer';
import { render, cleanup, RenderResult } from '@testing-library/react';

import Icon from './Icon';
Expand Down
7 changes: 4 additions & 3 deletions src/app/components/base/Icon/Icon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import React, { useState, useEffect, FunctionComponent } from 'react';

import './Icon.scss';

Expand All @@ -8,13 +8,14 @@ type PropsType = {
size: number | string;
};

const Icon = ({ path, size }: PropsType): JSX.Element => {
const Icon: FunctionComponent<PropsType> = ({ path, size }: PropsType) => {
const [iconPath, setIconPath] = useState('');

useEffect(() => {
(async (): Promise<void> => {
try {
const icon = await import('~/assets/svg/' + path + '.svg'); // eslint-disable-line prefer-template
// eslint-disable-next-line prettier/prettier
const icon = await import(/* webpackChunkName: "ShopIcon" */ '~/assets/svg/' + path + '.svg'); // eslint-disable-line prefer-template
setIconPath(icon.default);
// eslint-disable-next-line no-empty
} catch (err) {}
Expand Down
3 changes: 1 addition & 2 deletions src/app/components/common/ImgLoader/ImgLoader.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-empty-function */
import React from 'react';
import { act } from 'react-dom/test-utils';
import { cleanup, render, RenderResult } from '@testing-library/react';
import { cleanup, render, RenderResult, act } from '@testing-library/react';

import ImgLoader from './ImgLoader';

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/common/ImgLoader/ImgLoader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect, memo } from 'react';
import React, { useState, useEffect, memo, ReactElement } from 'react';

import Spinner from '~/components/base/Spinner';

Expand All @@ -11,7 +11,7 @@ type PropsType = {
onError?: (error: string | Event) => void;
};

function ImgLoader({ src, onError }: PropsType): React.ReactElement {
function ImgLoader({ src, onError }: PropsType): ReactElement {
const [imgObj, setImg] = useState({ img: '', isLoading: true });

const image = new Image();
Expand Down
28 changes: 0 additions & 28 deletions src/app/components/common/LazyComponent/LazyComponent.test.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions src/app/components/common/LazyComponent/LazyComponent.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/app/components/common/LazyComponent/index.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/components/common/ProductCard/ProductCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import React from 'react';
import { render, cleanup } from '@testing-library/react';

import ProductCard from './ProductCard';
import { ProductType } from '~/store/modules/products/types';
import { Product } from '~/store/modules/products/types';

afterEach(cleanup);

describe('ProductCard', () => {
const product: ProductType = {
const product: Product = {
_id: '5cc2def690118411e1311e92',
name: 'Nike Air Jordan',
image:
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/common/ProductCard/ProductCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React, { ReactElement } from 'react';

import ImgLoader from '~/components/common/ImgLoader';

import { ProductType } from '~/store/modules/products/types';
import { Product } from '~/store/modules/products/types';

import './ProductCard.scss';

type PropsType = {
product: ProductType;
product: Product;
hasOverlay: boolean;
hasHover: boolean;
width: string;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/common/Sidebar/Sidebar.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactElement } from 'react';
import { act } from 'react-dom/test-utils';
import { act } from 'react-test-renderer';
import { render, cleanup, fireEvent, RenderResult } from '@testing-library/react';

import Sidebar from './Sidebar';
Expand Down
28 changes: 12 additions & 16 deletions src/app/components/core/Footer/Footer.test.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
import React from 'react';
import { cleanup, render, RenderResult } from '@testing-library/react';

import { cleanup } from '@testing-library/react';
import { act } from 'react-dom/test-utils';
import renderFromAlien from '~/shared/utils/testing/renderFromAlien';
import Footer from './index';

import renderWithRedux from '~/shared/utils/testing/renderWithRedux';
afterEach(cleanup);

import Footer from './Footer';
let testRenderer = {} as RenderResult;

afterEach(cleanup);
beforeEach(async () => {
const { result, wrapper } = await renderFromAlien(Footer);
const FooterComponent = result.current;

testRenderer = render(FooterComponent, { wrapper });
});

describe('Footer test', () => {
it('should have only one social network', async () => {
let testRenderer = {};
await act(async () => {
testRenderer = renderWithRedux(<Footer />);
});
const { getByTestId } = testRenderer;
const social = getByTestId('social');
expect(social.children.length).toBe(1);
});

it('should copyright text properly', async () => {
let testRenderer = {};

await act(async () => {
testRenderer = renderWithRedux(<Footer />);
});
const { getByTestId } = testRenderer;
const copyright = getByTestId('copyright');
expect(copyright.textContent).toBe('Copyright © 2019. All Rights Reserved');
expect(copyright.textContent).toBe('Copyright © 2020. All Rights Reserved');
});
});
4 changes: 2 additions & 2 deletions src/app/components/core/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { ReactElement } from 'react';

import { useSelector } from 'react-redux';

Expand All @@ -9,7 +9,7 @@ import Icon from '~/components/base/Icon';

import './Footer.scss';

const Footer = (): React.ReactElement => {
const Footer = (): ReactElement => {
const { social }: FooterType = useSelector(getFooter);

return (
Expand Down
13 changes: 12 additions & 1 deletion src/app/components/core/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
export { default } from './Footer';
import { ReactElement } from 'react';

import withAlien from '~/store/config/alienStore/withAlien';
import FooterComponent from './Footer';

type FooterModule = Promise<typeof import('~/store/modules/footer/footer.module')>;

export default (): ReactElement =>
withAlien(FooterComponent, [
(): FooterModule =>
import(/* webpackChunkName: "ReduxModule" */ '~/store/modules/footer/footer.module'),
]);
Loading