Adjusted the way we import react to match how it's done in the project.

This commit is contained in:
Piotr Janosz
2019-07-29 17:54:41 +02:00
committed by fabioberger
parent b5e02d1b74
commit 086fa31d04
46 changed files with 63 additions and 64 deletions

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Hits, InstantSearch } from 'react-instantsearch-dom';
import { Columns } from 'ts/components/docs/layout/columns';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { CommunityLinks } from 'ts/components/docs/home/community_links';
import { MiddleSection } from 'ts/components/docs/home/middle_section';

View File

@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import * as React from 'react';
import { match } from 'react-router-dom';
import { MDXProvider } from '@mdx-js/react';
@@ -42,7 +42,7 @@ interface IDocsPageState {
}
export const DocsPage: React.FC<IDocsPageProps> = ({ match }) => {
const [state, setState] = useState<IDocsPageState>({
const [state, setState] = React.useState<IDocsPageState>({
Component: null,
contents: [],
title: '',
@@ -54,7 +54,7 @@ export const DocsPage: React.FC<IDocsPageProps> = ({ match }) => {
const isLoading = !Component && !wasNotFound;
const { page, type } = match.params;
useEffect(
React.useEffect(
() => {
void loadPageAsync(page, type);
},

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { connectHits, InstantSearch } from 'react-instantsearch-dom';
import styled from 'styled-components';