This commit modifies several language labels and refines hooks related to 'teams' and 'billing' modules for better clarity and consistency. It also includes the deletion of unused locale files and package dependencies transfered to 'peerDependencies'. Lastly, it introduces minor enhancements in server command, error logging functionality, and scripts to interact with Stripe.
27 lines
478 B
TypeScript
27 lines
478 B
TypeScript
'use client';
|
|
|
|
import type { ReactNode } from 'react';
|
|
import { Component } from 'react';
|
|
|
|
export class ErrorBoundary extends Component<{
|
|
fallback: ReactNode;
|
|
children: ReactNode;
|
|
}> {
|
|
readonly state = { hasError: false, error: null };
|
|
|
|
static getDerivedStateFromError(error: unknown) {
|
|
return {
|
|
hasError: true,
|
|
error,
|
|
};
|
|
}
|
|
|
|
render() {
|
|
if (this.state.hasError) {
|
|
return this.props.fallback;
|
|
}
|
|
|
|
return this.props.children;
|
|
}
|
|
}
|