UNPKG

@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.

2 lines (1 loc) 635 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),o=require("react"),c=require("../conf/index.js");function s(){const[n,i]=o.useState(null);if(!n){const r=c.Config.REACT_APP_WP_API;fetch(r).then(e=>e.json()).then(e=>{e&&e.site_icon_url&&i(e.site_icon_url)}).catch(e=>{console.error("Failed to fetch favicon:",e)})}return t.jsx(t.Fragment,{children:n&&t.jsxs(t.Fragment,{children:[t.jsx("link",{rel:"icon",href:n}),t.jsx("link",{rel:"apple-touch-icon",href:n}),t.jsx("link",{rel:"shortcut",href:n})]})})}const l=o.memo(s);exports.default=l;