feat: fix the problem in the Operator Market frontend pages

This commit is contained in:
root
2025-12-29 11:38:47 +08:00
parent 29e4a333a9
commit 844add27ea
213 changed files with 45547 additions and 45537 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;
};