@redneckz/wildless-cms-uni-blocks 0.14.1031 → 0.14.1033

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -707,14 +707,18 @@
707
707
 
708
708
  /** @deprecated */
709
709
  const LinkButton = JSX(({ disabled, children, method = 'LINK', href, id, additionalHrefs, ...rest }) => {
710
+ const [currentLink, setCurrentLink] = useState();
710
711
  const handleFormSubmit = useFormSubmit({ method, href });
711
712
  const linksStore = useLocalStore();
712
713
  saveLinksToStore({ linksStore, href, id, additionalHrefs });
713
714
  const adjustedHref = additionalHrefs
714
715
  ? (linksStore.links || []).find((store) => store.id === id)?.lastLink
715
716
  : href;
717
+ useEffect(() => {
718
+ setCurrentLink(adjustedHref);
719
+ }, [adjustedHref]);
716
720
  const link = useLink();
717
- const adjustedProps = link({ onClick: handleFormSubmit, href: adjustedHref, ...rest });
721
+ const adjustedProps = link({ onClick: handleFormSubmit, href: currentLink, ...rest });
718
722
  const buttonInner = children ?? jsx(ButtonInner, { ...adjustedProps });
719
723
  return disabled ? (jsx(DisabledButton, { ...adjustedProps, children: buttonInner })) : (jsx(RegularButton, { ...adjustedProps, children: buttonInner }));
720
724
  });
@@ -13982,9 +13986,8 @@
13982
13986
  const TariffsTableRowContainer = JSX(({ children, tableInner, onClick }) => (jsxs("div", { className: style('self-start flex flex-col gap-xl', DIVIDER_STYLE), role: "row", children: [jsx("div", { className: style('flex flex-col lg:flex-row gap-x-5xl gap-y-xs'), children: children }), tableInner ? (jsx("div", { className: "origin-top animate-expansion", children: jsx(InnerTable, { ...tableInner, onClick: onClick }) })) : null] })));
13983
13987
 
13984
13988
  const RATES_COLUMN_STYLE = `grid grid-cols-3 gap-s`;
13985
- const Rate = UniBlock(({ currencyPair = '', buyRate = 0, sellRate = 0 }) => (jsxs("div", { className: style('mb-s', RATES_COLUMN_STYLE, DIVIDER_STYLE), children: [jsx("div", { children: formatCurrencyPair(currencyPair) }), jsx("div", { children: formatRate(buyRate) }), jsx("div", { children: formatRate(sellRate) })] })));
13989
+ const Rate = UniBlock(({ currencyPair = '', buyRate = 0, sellRate = 0 }) => (jsxs("div", { className: style('mb-s', RATES_COLUMN_STYLE, DIVIDER_STYLE), children: [jsx("div", { children: formatCurrencyPair(currencyPair) }), jsx("div", { children: buyRate }), jsx("div", { children: sellRate })] })));
13986
13990
  const formatCurrencyPair = (currency) => currency.replace('_TOD', '');
13987
- const formatRate = (rate) => rate.toFixed(4);
13988
13991
 
13989
13992
  const TIMEZONE = 'МСК';
13990
13993
  const renderDate = ({ dateString, isArchive = false }) => {
@@ -14617,7 +14620,7 @@
14617
14620
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
14618
14621
  });
14619
14622
 
14620
- const packageVersion = "0.14.1030";
14623
+ const packageVersion = "0.14.1032";
14621
14624
 
14622
14625
  exports.Blocks = Blocks;
14623
14626
  exports.ContentPage = ContentPage;