@wistia/ui 0.7.0-beta.09ed20f2.84f70f9 → 0.7.0

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
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.7.0-beta.09ed20f2.84f70f9
3
+ * @license @wistia/ui v0.7.0
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -6908,7 +6908,7 @@ var Link = forwardRef(
6908
6908
  }, ref) => {
6909
6909
  const inRouterContext = useInRouterContext();
6910
6910
  const to = generateHref(props.href, type, disabled);
6911
- const handleClick = async (event) => {
6911
+ const handleClick = async (event, routingCallback = null) => {
6912
6912
  if (disabled) {
6913
6913
  event.preventDefault();
6914
6914
  } else if (beforeAction) {
@@ -6920,9 +6920,11 @@ var Link = forwardRef(
6920
6920
  } finally {
6921
6921
  if (isFunction2(props.onClick)) {
6922
6922
  props.onClick(event);
6923
- }
6924
- if (!inRouterContext && isNotNil5(to)) {
6923
+ } else if (routingCallback !== null) {
6924
+ routingCallback();
6925
+ } else if (isNotNil5(to)) {
6925
6926
  window.location.assign(to);
6927
+ } else {
6926
6928
  }
6927
6929
  }
6928
6930
  } else if (isFunction2(props.onClick)) {