Skip to content

Commit

Permalink
refactor(shared/types): move State into store
Browse files Browse the repository at this point in the history
  • Loading branch information
aneurysmjs committed Feb 2, 2020
1 parent 9098551 commit c7a4b88
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/app/shared/types/MiddlewareTypes.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Middleware } from 'redux';
import { State } from '~/shared/types/State';
import { State } from '~/store/State';

export type ApiMetaType<T = Response> = {
types: Array<string>;
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/utils/testing/renderWithRedux.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createStore, Store } from 'redux';
import { Provider } from 'react-redux';

import { render, RenderResult } from '@testing-library/react';
import { State } from '~/shared/types/State';
import { State } from '~/store/State';

import reducer from '~/store/reducers';

Expand Down
5 changes: 0 additions & 5 deletions src/app/store/ActionTypes.tsx

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion src/app/store/config/middlewares/logger/logger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Middleware } from 'redux';

import { State } from '~/shared/types/State';
import { State } from '~/store/State';
import { Actions } from '~/shared/types/Actions';

/* eslint-disable no-console */
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/modules/cart/selectors/getCart.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { State } from '~/shared/types/State';
import { State } from '~/store/State';
import { CartType } from '~/store/modules/cart/types';
// eslint-disable-next-line import/prefer-default-export
export const getCart = (state: State): CartType => state.cart;
2 changes: 1 addition & 1 deletion src/app/store/modules/footer/selectors/getFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */

import { State } from '~/shared/types/State';
import { State } from '~/store/State';
// eslint-disable-next-line import/prefer-default-export
export const getFooter = (state: State) => state.footer;
2 changes: 1 addition & 1 deletion src/app/store/modules/products/selectors/getProducts.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { State } from '~/shared/types/State';
import { State } from '~/store/State';
import { ProductsStateType } from '~/store/modules/products/types';
// eslint-disable-next-line import/prefer-default-export
export const getProducts = ({ products }: State): ProductsStateType => products;
2 changes: 1 addition & 1 deletion src/server/components/HTML.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import Helmet from 'react-helmet';

import { State } from '~/shared/types/State';
import { State } from '~/store/State';

type PropsT = {
children: JSX.Element | Array<JSX.Element> | string;
Expand Down

0 comments on commit c7a4b88

Please sign in to comment.