@wistia/ui 0.6.45-beta.cdb67e81.9dbf4c3 → 0.6.45

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.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.6.45-beta.cdb67e81.9dbf4c3
3
+ * @license @wistia/ui v0.6.45
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7028,7 +7028,7 @@ var Link = (0, import_react15.forwardRef)(
7028
7028
  }, ref) => {
7029
7029
  const inRouterContext = (0, import_react_router_dom.useInRouterContext)();
7030
7030
  const to = generateHref(props.href, type, disabled);
7031
- const handleClick = async (event) => {
7031
+ const handleClick = async (event, routingCallback = null) => {
7032
7032
  if (disabled) {
7033
7033
  event.preventDefault();
7034
7034
  } else if (beforeAction) {
@@ -7040,9 +7040,11 @@ var Link = (0, import_react15.forwardRef)(
7040
7040
  } finally {
7041
7041
  if ((0, import_type_guards14.isFunction)(props.onClick)) {
7042
7042
  props.onClick(event);
7043
- }
7044
- if (!inRouterContext && (0, import_type_guards14.isNotNil)(to)) {
7043
+ } else if (routingCallback !== null) {
7044
+ routingCallback();
7045
+ } else if ((0, import_type_guards14.isNotNil)(to)) {
7045
7046
  window.location.assign(to);
7047
+ } else {
7046
7048
  }
7047
7049
  }
7048
7050
  } else if ((0, import_type_guards14.isFunction)(props.onClick)) {