Skip to content

Commit

Permalink
Merge pull request #10 from laxmanpokhrel/dev
Browse files Browse the repository at this point in the history
fix: required errorComponent in provider
  • Loading branch information
laxmanpokhrel authored Jan 2, 2024
2 parents 6f42cbe + 61ec576 commit ba203b2
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 226 deletions.
9 changes: 0 additions & 9 deletions lib/@types/index.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions lib/@types/index.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/@types/index.js.map

This file was deleted.

17 changes: 0 additions & 17 deletions lib/DefaultErrorBoundary.d.ts

This file was deleted.

69 changes: 0 additions & 69 deletions lib/DefaultErrorBoundary.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/DefaultErrorBoundary.js.map

This file was deleted.

8 changes: 0 additions & 8 deletions lib/context/ErrorBoundaryProvider.d.ts

This file was deleted.

40 changes: 0 additions & 40 deletions lib/context/ErrorBoundaryProvider.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/context/ErrorBoundaryProvider.js.map

This file was deleted.

4 changes: 0 additions & 4 deletions lib/context/errorBoundaryContext.d.ts

This file was deleted.

30 changes: 0 additions & 30 deletions lib/context/errorBoundaryContext.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/context/errorBoundaryContext.js.map

This file was deleted.

12 changes: 0 additions & 12 deletions lib/index.d.ts

This file was deleted.

26 changes: 0 additions & 26 deletions lib/index.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/index.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion src/@types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
export type ErrorComponentProps = { fileName: string; errorLocation: string; errorMessage: string | undefined };
export type ErrorComponentType = (props?: ErrorComponentProps) => JSX.Element;

export type ContextValueType = { errorComponent: ErrorComponentType };
export type ContextValueType = { errorComponent?: ErrorComponentType };
2 changes: 1 addition & 1 deletion src/context/ErrorBoundaryProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ErrorContext from './errorBoundaryContext';
import { ContextValueType, ErrorComponentType } from '../@types';

type HasErrorBoundaryPropsType = {
errorComponent: ErrorComponentType;
errorComponent?: ErrorComponentType;
children: React.ReactNode;
};
const ErrorBoundaryProvider = ({ errorComponent, children }: HasErrorBoundaryPropsType) => {
Expand Down

0 comments on commit ba203b2

Please sign in to comment.