Skip to content
This repository was archived by the owner on Jun 8, 2022. It is now read-only.

Commit a2b7084

Browse files
committed
Fix theme import error
1 parent 5e1a6a2 commit a2b7084

File tree

4 files changed

+11
-29
lines changed

4 files changed

+11
-29
lines changed

src/components/pages/_app.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import App, { AppInitialProps, AppProps, AppContext } from 'next/app';
44
import { ThemeProvider } from 'styled-components';
55

66
import { RouterContextProvider } from 'hooks';
7-
import { theme, GlobalStyling } from 'styles';
7+
import { GlobalStyling } from 'styles';
8+
import theme from 'styles/theme';
89

910
class NextApp extends App<Props> {
1011
static getInitialProps = async ({ Component, ctx }: AppContext): Promise<AppInitialProps> => {

src/styles/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from './global';
2-
export * from './theme';
32
export * from './utils';

src/types/general.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
/**
2-
* Get the value type(s) from an object
3-
*/
1+
/** Get the value type(s) from an object. */
42
export type ValueOf<T> = T[keyof T];
53

64
export type OnClick<Element, ReturnType = void> = (event: React.MouseEvent<Element, MouseEvent>) => ReturnType;
75

8-
// 'any' type is valid in the case of a value for a key/value pair
6+
/** 'any' type is valid in the case of a value for a key/value pair. */
97
// eslint-disable-next-line @typescript-eslint/no-explicit-any
108
export type AnyObject<key extends string | number | symbol = string> = Record<key, any>;
119

src/types/redux.ts

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,34 @@ import { Store as ReduxStore, CombinedState } from 'redux';
44
import { ThunkAction as IThunkAction, ThunkDispatch as IThunkDispatch } from 'redux-thunk';
55
import * as reducers from 'ducks';
66

7-
/**
8-
* Store type
9-
*/
7+
/** Store type. */
108
export type Store = ReduxStore<CombinedState<i.ReduxState>, i.ActionTypes>;
119

12-
/**
13-
* Generates a list of all actions types
14-
*/
10+
/** Generates a list of all actions types. */
1511
export type ActionTypes = i.ValueOf<{
1612
[Reducer in keyof typeof reducers]: Parameters<typeof reducers[Reducer]>[1];
1713
}>;
1814

19-
/**
20-
* Generates a union of all action names
21-
*/
15+
/** Generates a union of all action names. */
2216
export type ActionTypeNames = i.ValueOf<{
2317
[Reducer in keyof typeof reducers]: Parameters<typeof reducers[Reducer]>[1]['type'];
2418
}>;
2519

26-
/**
27-
* Shape of a Redux action
28-
* P = shape of payload
29-
*/
20+
/** Shape of a Redux action. */
3021
export type Action<P = any> = {
3122
type: i.ActionTypeNames;
3223
payload?: P;
3324
error?: boolean;
3425
meta?: any;
3526
};
3627

37-
/**
38-
* Thunk action type with pre-filled generics
39-
* ReturnType = return type of function
40-
*/
28+
/** Thunk action type with pre-filled generics. */
4129
type ExtraArgument = i.AnyObject;
4230
export type ThunkAction<ReturnType = void> = IThunkAction<ReturnType, i.ReduxState, ExtraArgument, i.Action>;
4331

44-
/**
45-
* Thunk Dispatch action with pre-filled generics
46-
*/
32+
/** Thunk Dispatch action with pre-filled generics. */
4733
export type ThunkDispatch = IThunkDispatch<i.ReduxState, any, i.Action>;
4834

49-
/**
50-
* Generator type for thunk actions
51-
*/
35+
/** Generator type for thunk actions. */
5236
export type BaseThunkAction<Fn extends (...args: any) => any> =
5337
(...args: Parameters<Fn>) => i.ThunkAction<ReturnType<Fn>>;

0 commit comments

Comments
 (0)