uikit/dist/remote-ui.js
Mohamadzadeh 3ffe5fef67
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Successful in 53s
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Successful in 7s
change GBadge remote url
2026-07-09 16:05:55 +03:30

44 lines
863 B
JavaScript

import { jsx as c } from "react/jsx-runtime";
import { useRef as s, useEffect as i } from "react";
const a = "https://uikit.d.aiengines.ir/GBadge.js";
let n = null;
function u() {
return n || (n = import(
/* webpackIgnore: true */
/* @vite-ignore */
a
)), n;
}
const m = (o) => {
const r = s(null);
return i(() => {
let e = !0;
return u().then((t) => {
e && r.current && t.mount(r.current, o);
}).catch((t) => {
console.error("[uikit/remote/ui] Failed to load GBadge:", t);
}), () => {
e = !1;
};
}, [o]), i(() => {
const e = r.current;
return () => {
e && u().then((t) => {
t.unmount(e);
}).catch(() => {
});
};
}, []), /* @__PURE__ */ c(
"span",
{
ref: r,
style: {
display: "contents"
}
}
);
};
export {
m as GBadge
};