@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) • 819 B
JavaScript
import { jsx as r } from "react/jsx-runtime";
import c from "../ResponsiveContainer.js";
import { PostProvider as m, PostConsumer as w, Post as v } from "@devgateway/wp-react-lib";
import { useLocation as P, useParams as l } from "react-router";
const y = ({ header: t, footer: s }) => {
const n = P(), e = l(), o = new URLSearchParams(n.search), i = o.get("preview"), p = e.type == "post" ? "posts" : e.type, a = o.get("_wpnonce");
return /* @__PURE__ */ r(c, { header: t, footer: s, children: /* @__PURE__ */ r(
m,
{
type: p,
store: "preview",
perPage: 1,
view: i,
locale: e.lan,
previewNonce: a,
previewId: e.id,
children: /* @__PURE__ */ r(w, { children: /* @__PURE__ */ r(v, { preview: !0, showIntro: !0 }) })
}
) });
};
export {
y as default
};