@insforge/react 0.2.2 → 0.2.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/atoms.js +17 -1
- package/dist/atoms.js.map +1 -1
- package/dist/atoms.mjs +17 -1
- package/dist/atoms.mjs.map +1 -1
- package/dist/components.js +17 -1
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +17 -1
- package/dist/components.mjs.map +1 -1
- package/dist/forms.js +17 -1
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +17 -1
- package/dist/forms.mjs.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/components.mjs
CHANGED
|
@@ -403,6 +403,22 @@ function AuthSubmitButton({
|
|
|
403
403
|
);
|
|
404
404
|
}
|
|
405
405
|
function AuthLink({ text, linkText, href, appearance = {} }) {
|
|
406
|
+
const currentSearch = typeof window !== "undefined" ? window.location.search : "";
|
|
407
|
+
const finalHref = (() => {
|
|
408
|
+
if (!currentSearch) return href;
|
|
409
|
+
try {
|
|
410
|
+
const url = new URL(href, window.location.origin);
|
|
411
|
+
const currentParams = new URLSearchParams(currentSearch);
|
|
412
|
+
currentParams.forEach((value, key) => {
|
|
413
|
+
if (!url.searchParams.has(key)) {
|
|
414
|
+
url.searchParams.set(key, value);
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
return url.pathname + url.search;
|
|
418
|
+
} catch {
|
|
419
|
+
return href;
|
|
420
|
+
}
|
|
421
|
+
})();
|
|
406
422
|
return /* @__PURE__ */ jsxs("p", { className: cn(
|
|
407
423
|
"text-center text-sm font-normal text-[#828282] leading-6",
|
|
408
424
|
appearance.containerClassName
|
|
@@ -412,7 +428,7 @@ function AuthLink({ text, linkText, href, appearance = {} }) {
|
|
|
412
428
|
/* @__PURE__ */ jsx(
|
|
413
429
|
"a",
|
|
414
430
|
{
|
|
415
|
-
href,
|
|
431
|
+
href: finalHref,
|
|
416
432
|
className: cn(
|
|
417
433
|
"text-sm font-medium text-black leading-6",
|
|
418
434
|
appearance.linkClassName
|