chore(deps): update non-major dependencies #9
Frontend verify / commits (pull_request) Successful in 35s
Frontend verify / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Successful in 6m37s
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 11s
Frontend verify / verify (push) Failing after 6m29s
Frontend verify / commits (pull_request) Successful in 35s
Frontend verify / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Successful in 6m37s
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 11s
Frontend verify / verify (push) Failing after 6m29s
This commit was merged in pull request #52.
This commit is contained in:
@@ -10,7 +10,6 @@ import { useAuth } from "@/features/auth";
|
||||
|
||||
type BoundaryProps = PropsWithChildren<{
|
||||
authenticated: boolean;
|
||||
routeKey: string;
|
||||
}>;
|
||||
|
||||
type RouteErrorFallbackProps = {
|
||||
@@ -26,12 +25,6 @@ class Boundary extends Component<BoundaryProps, State> {
|
||||
|
||||
override state: State = { hasError: false };
|
||||
|
||||
override componentDidUpdate(previousProps: BoundaryProps) {
|
||||
if (previousProps.routeKey !== this.props.routeKey && this.state.hasError) {
|
||||
this.setState({ hasError: false });
|
||||
}
|
||||
}
|
||||
|
||||
override render() {
|
||||
return this.state.hasError
|
||||
? <RouteErrorFallback authenticated={this.props.authenticated} />
|
||||
@@ -70,10 +63,7 @@ const RouteErrorBoundary: FC<PropsWithChildren> = (props) => {
|
||||
const { user } = useAuth();
|
||||
|
||||
return (
|
||||
<Boundary
|
||||
authenticated={Boolean(user)}
|
||||
routeKey={`${pathname}${search}:${key}`}
|
||||
>
|
||||
<Boundary authenticated={Boolean(user)} key={`${pathname}${search}:${key}`}>
|
||||
{children}
|
||||
</Boundary>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user