@redneckz/wildless-cms-uni-blocks 0.14.1032 → 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
  });
@@ -14616,7 +14620,7 @@
14616
14620
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
14617
14621
  });
14618
14622
 
14619
- const packageVersion = "0.14.1031";
14623
+ const packageVersion = "0.14.1032";
14620
14624
 
14621
14625
  exports.Blocks = Blocks;
14622
14626
  exports.ContentPage = ContentPage;