optimized-react-component-library-xyz123 2.8.2 → 2.8.3

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.
package/dist/index.mjs CHANGED
@@ -3777,15 +3777,18 @@ var Navigation = ({
3777
3777
  }
3778
3778
  return "\xD6ppna undermeny f\xF6r " + label["sv"];
3779
3779
  };
3780
- const setInstruction = () => {
3780
+ const [instruction, setInstruction] = useState9("");
3781
+ useEffect13(() => {
3781
3782
  if (firstVisitRef.current) {
3782
3783
  firstVisitRef.current = false;
3783
- return "";
3784
+ return;
3784
3785
  }
3785
- return isOpen ? activatedLanguage === "sv" ? "Navigationsmenyn \xF6ppnades" : "Navigation menu opened" : activatedLanguage === "sv" ? "Navigationsmenyn st\xE4ngdes" : "Navigation menu closed";
3786
- };
3786
+ setInstruction(
3787
+ isOpen ? activatedLanguage === "sv" ? "Navigationsmenyn \xF6ppnades" : "Navigation menu opened" : activatedLanguage === "sv" ? "Navigationsmenyn st\xE4ngdes" : "Navigation menu closed"
3788
+ );
3789
+ }, [isOpen, activatedLanguage]);
3787
3790
  return /* @__PURE__ */ jsxs24(Fragment18, { children: [
3788
- /* @__PURE__ */ jsx28("div", { "aria-live": "polite", className: "sr-only", children: setInstruction() }),
3791
+ /* @__PURE__ */ jsx28("div", { "aria-live": "polite", className: "sr-only", children: instruction }),
3789
3792
  /* @__PURE__ */ jsxs24(
3790
3793
  "nav",
3791
3794
  {