import { PropsWithChildren } from 'react';

import { CommonErrorBoundary } from '@/widgets/error-boundaries/common-error-boundary';
import { CommonError } from '@/widgets/fallbacks/common-error';

type Props = PropsWithChildren;

export const GlobalErrorBoundary = ({ children }: Props) => {
  return (
    <CommonErrorBoundary FallbackComponent={ CommonError }>{ children }</CommonErrorBoundary>
  );
};
