Revert "feat: fix the problem in the Operator Market frontend pages"

This commit is contained in:
Kecheng Sha
2025-12-29 12:00:37 +08:00
committed by GitHub
parent 8f30f71a68
commit 0df7a872e4
213 changed files with 45537 additions and 45547 deletions

View File

@@ -1,29 +1,29 @@
import React from "react";
export const MultiProvider = (props) => {
let content = props.children || null;
/* Error/Validation */
if (!props.providers) {
throw "MultiProvider: Missing providers prop";
}
if (!props.children) {
throw "MultiProvider: Missing children";
}
// Turn object into an array
// const numberOfProviders = props.providers.size;
const numberOfProviders = props.providers.length;
if (!numberOfProviders) {
// Providers prop is empty, r
return content;
}
[...(props.providers ?? [])].reverse().forEach((provider) => {
content = React.cloneElement(provider, null, content);
});
return content;
};
import React from "react";
export const MultiProvider = (props) => {
let content = props.children || null;
/* Error/Validation */
if (!props.providers) {
throw "MultiProvider: Missing providers prop";
}
if (!props.children) {
throw "MultiProvider: Missing children";
}
// Turn object into an array
// const numberOfProviders = props.providers.size;
const numberOfProviders = props.providers.length;
if (!numberOfProviders) {
// Providers prop is empty, r
return content;
}
[...(props.providers ?? [])].reverse().forEach((provider) => {
content = React.cloneElement(provider, null, content);
});
return content;
};