Skip to content

Commit

Permalink
fix: react import location and functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jonyw4 committed Aug 18, 2020
1 parent 95c50df commit a2f0144
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Color/Color.component.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { render, act, waitFor } from '@testing-library/react';
import Color from './Color.component';

Expand Down
2 changes: 1 addition & 1 deletion src/Color/Color.component.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { ColorFormats, ReducerState, ArrayRGB } from '../types';
import useColor from './useColor';

Expand Down
4 changes: 2 additions & 2 deletions src/Color/useColor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { useCurrentEffect } from 'use-current-effect';
import { useReducer } from 'react';
import {
getPredominantColorFromImgURL,
reducer,
Expand All @@ -20,7 +20,7 @@ export default function useColor<
): S {
const { crossOrigin = null, quality = 10 } = options;

const [state, dispatch] = useReducer(reducer, <S>initialReducerState);
const [state, dispatch] = React.useReducer(reducer, <S>initialReducerState);

useCurrentEffect(
(isCurrent) => {
Expand Down
2 changes: 1 addition & 1 deletion src/Palette/Palette.component.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { render, waitFor, act } from '@testing-library/react';
import Palette from './Palette.component';

Expand Down
2 changes: 1 addition & 1 deletion src/Palette/Palette.component.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { ColorFormats, ReducerState, ArrayRGB } from '../types';
import usePalette from './usePalette';

Expand Down
4 changes: 2 additions & 2 deletions src/Palette/usePalette.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { useCurrentEffect } from 'use-current-effect';
import { useReducer } from 'react';
import {
getColorsPaletteFromImgUrl,
reducer,
Expand All @@ -21,7 +21,7 @@ export default function usePalette<
): S {
const { crossOrigin = null, quality = 10 } = options;

const [state, dispatch] = useReducer(reducer, <S>initialReducerState);
const [state, dispatch] = React.useReducer(reducer, <S>initialReducerState);

useCurrentEffect(
(isCurrent) => {
Expand Down

0 comments on commit a2f0144

Please sign in to comment.