Some checks failed
CI/CD Pipeline / unit-tests (push) Failing after 1m16s
CI/CD Pipeline / integration-tests (push) Failing after 2m32s
CI/CD Pipeline / lint (push) Successful in 5m22s
CI/CD Pipeline / e2e-tests (push) Has been skipped
CI/CD Pipeline / build (push) Has been skipped
32 lines
884 B
JavaScript
32 lines
884 B
JavaScript
"use client";
|
|
|
|
// src/QueryErrorResetBoundary.tsx
|
|
import * as React from "react";
|
|
import { jsx } from "react/jsx-runtime";
|
|
function createValue() {
|
|
let isReset = false;
|
|
return {
|
|
clearReset: () => {
|
|
isReset = false;
|
|
},
|
|
reset: () => {
|
|
isReset = true;
|
|
},
|
|
isReset: () => {
|
|
return isReset;
|
|
}
|
|
};
|
|
}
|
|
var QueryErrorResetBoundaryContext = React.createContext(createValue());
|
|
var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
|
|
var QueryErrorResetBoundary = ({
|
|
children
|
|
}) => {
|
|
const [value] = React.useState(() => createValue());
|
|
return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
|
|
};
|
|
export {
|
|
QueryErrorResetBoundary,
|
|
useQueryErrorResetBoundary
|
|
};
|
|
//# sourceMappingURL=QueryErrorResetBoundary.js.map
|