Skip to content

Commit

Permalink
Fixed window undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
rstaib committed May 4, 2021
1 parent 476d6d6 commit 80b8efb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 41 deletions.
3 changes: 0 additions & 3 deletions website/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ const path = require(`path`);

exports.createPages = async ({ actions, graphql, reporter }) => {
const { createPage, createRedirect } = actions;
const blogArticleTemplate = path.resolve(
`src/templates/blog-article-template.tsx`
);
const result = await graphql(`
{
blog: allMdx(
Expand Down
36 changes: 6 additions & 30 deletions website/mdx.types.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,10 @@
declare module "@mdx-js/react" {
import * as React from "react";
type ComponentType =
| "a"
| "blockquote"
| "code"
| "del"
| "em"
| "h1"
| "h2"
| "h3"
| "h4"
| "h5"
| "h6"
| "hr"
| "img"
| "inlineCode"
| "li"
| "ol"
| "p"
| "pre"
| "strong"
| "sup"
| "table"
| "td"
| "thematicBreak"
| "tr"
| "ul";
import { Component, ComponentType, ReactNode } from "react";

export interface MDXProviderProps {
children: React.ReactNode;
components: Record<any, React.ComponentType<any>>;
children: ReactNode;
components: Record<any, ComponentType<any>>;
}
export class MDXProvider extends React.Component<MDXProviderProps> {}

export class MDXProvider extends Component<MDXProviderProps> {}
}
1 change: 0 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"react-redux": "^7.2.1",
"react-responsive-carousel": "^3.2.11",
"react-share": "^4.2.1",
"redux-devtools-extension": "^2.13.9",
"styled-components": "^5.2.3"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions website/src/state/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function createStore(preloadedState: State) {
return createReduxStore(
rootReducer,
preloadedState,
(window as any).__REDUX_DEVTOOLS_EXTENSION__ &&
(window as any).__REDUX_DEVTOOLS_EXTENSION__()
typeof window === "object" &&
(window as any).__REDUX_DEVTOOLS_EXTENSION__?.()
);
}
5 changes: 0 additions & 5 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16038,11 +16038,6 @@ redent@^1.0.0:
indent-string "^2.1.0"
strip-indent "^1.0.1"

redux-devtools-extension@^2.13.9:
version "2.13.9"
resolved "https://registry.yarnpkg.com/redux-devtools-extension/-/redux-devtools-extension-2.13.9.tgz#6b764e8028b507adcb75a1cae790f71e6be08ae7"
integrity sha512-cNJ8Q/EtjhQaZ71c8I9+BPySIBVEKssbPpskBfsXqb8HJ002A3KRVHfeRzwRo6mGPqsm7XuHTqNSNeS1Khig0A==

redux-thunk@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622"
Expand Down

0 comments on commit 80b8efb

Please sign in to comment.