@devgateway/dvz-ui-react
Version:
A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.
24 lines (23 loc) • 763 B
JavaScript
import { jsx as t, Fragment as i, jsxs as c } from "react/jsx-runtime";
import l, { useState as s } from "react";
import { Config as f } from "../conf/index.js";
function h() {
const [e, n] = s(null);
if (!e) {
const r = f.REACT_APP_WP_API;
fetch(r).then((o) => o.json()).then((o) => {
o && o.site_icon_url && n(o.site_icon_url);
}).catch((o) => {
console.error("Failed to fetch favicon:", o);
});
}
return /* @__PURE__ */ t(i, { children: e && /* @__PURE__ */ c(i, { children: [
/* @__PURE__ */ t("link", { rel: "icon", href: e }),
/* @__PURE__ */ t("link", { rel: "apple-touch-icon", href: e }),
/* @__PURE__ */ t("link", { rel: "shortcut", href: e })
] }) });
}
const _ = l.memo(h);
export {
_ as default
};