Skip to content

Commit

Permalink
Merge pull request #18 from recurly/fix-warnings
Browse files Browse the repository at this point in the history
Fixes all warnings in demo and lib
  • Loading branch information
chrissrogers authored Jan 27, 2020
2 parents f5e0d57 + 0edf5c5 commit 1311a5c
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion demo/src/card-element-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {

const handleBlur = () => console.log('[blur]');
const handleChange = change => console.log('[change]', change);
const handleClick = () => console.log('[click]');
const handleFocus = () => console.log('[focus]');
const handleReady = () => console.log('[ready]');

Expand Down
1 change: 0 additions & 1 deletion demo/src/individual-card-elements-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {

const handleBlur = () => console.log('[blur]');
const handleChange = change => console.log('[change]', change);
const handleClick = () => console.log('[click]');
const handleFocus = () => console.log('[focus]');
const handleReady = () => console.log('[ready]');

Expand Down
1 change: 0 additions & 1 deletion demo/src/three-d-secure-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React, { useState } from 'react';
import {
RecurlyProvider,
ThreeDSecureAction,
useRecurly
} from '@recurly/react-recurly';

const handleThreeDSecureToken = token =>
Expand Down
2 changes: 1 addition & 1 deletion lib/elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RecurlyContext } from './provider';

export const RecurlyElementsContext = React.createContext();

const { Provider, Consumer } = RecurlyElementsContext;
const { Provider } = RecurlyElementsContext;

export default class Elements extends React.Component {
static propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion lib/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';

export const RecurlyContext = React.createContext({ recurly: null });

const { Provider, Consumer } = RecurlyContext;
const { Provider } = RecurlyContext;

/**
* This is the top-level component for `react-recurly`, and must wrap any other
Expand Down
2 changes: 0 additions & 2 deletions lib/three-d-secure-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { RecurlyContext } from './provider';

export const ThreeDSecureActionContext = React.createContext();

const { Provider, Consumer } = ThreeDSecureActionContext;

export default class ThreeDSecureAction extends React.PureComponent {
static propTypes = {
/**
Expand Down
6 changes: 3 additions & 3 deletions lib/use-recurly.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useContext } from 'react';
import { useContext } from 'react';
import { RecurlyElementsContext } from './elements';

/**
Expand All @@ -14,8 +14,8 @@ export default function useRecurly () {
);
}

const [ elements, setElements ] = useState(elementsContext.elements);
const [ recurly, setRecurly ] = useState(elements.recurly);
const { elements } = elementsContext;
const { recurly } = elements

return {
...recurly,
Expand Down

0 comments on commit 1311a5c

Please sign in to comment.