Skip to content

Commit

Permalink
fix(error-boundary-jsx): fix broken dupe exports (#284)
Browse files Browse the repository at this point in the history
* fix(error-boundary-jsx): fix broken dupe exports

* fix: tests

* fix: another test
  • Loading branch information
matmalkowski authored Nov 29, 2019
1 parent d722e13 commit 01bf9dc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/error-boundary-jsx/src/ErrorBoundary/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import ErrorBoundary, { ErrorFallbackProps } from './ErrorBoundary';
import ErrorBoundary from './ErrorBoundary';

export default ErrorBoundary;
export type ErrorFallbackProps = ErrorFallbackProps;
5 changes: 4 additions & 1 deletion packages/error-boundary-jsx/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { ErrorFallbackProps } from './ErrorBoundary/ErrorBoundary';

export { default as withErrorBoundary } from './withErrorBoundary';
export { default as ErrorBoundary } from './ErrorBoundary';
export * from './ErrorBoundary';

export type ErrorFallbackProps = ErrorFallbackProps;
3 changes: 2 additions & 1 deletion packages/error-boundary-jsx/tests/ErrorBoundary.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { render, cleanup } from '@testing-library/react';
import ErrorBoundary, { ErrorFallbackProps } from '../src/ErrorBoundary';
import ErrorBoundary from '../src/ErrorBoundary';
import { ErrorFallbackProps } from '../src/ErrorBoundary/ErrorBoundary';

describe('<ErrorBoundary />', () => {
class BuggyComponent extends React.PureComponent<{}, {}> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { cleanup, render } from '@testing-library/react';
import withErrorBoundary from '../src/withErrorBoundary';
import { ErrorFallbackProps } from '../src/ErrorBoundary';
import { ErrorFallbackProps } from '../src/ErrorBoundary/ErrorBoundary';

interface DummyErrorComponentProps {
name?: string;
Expand Down

0 comments on commit 01bf9dc

Please sign in to comment.