page-transition 0.1.0-beta.15 → 0.1.0-beta.17

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.
@@ -110,7 +110,9 @@ export function CssTransitionProvider({ header, options, children }) {
110
110
  state.current = 'entering';
111
111
  }
112
112
  });
113
- currentPathname.current = pathname;
113
+ console.log('pathname fired', pathname, 'state:' + state.current);
114
+ if (state.current === 'navigating')
115
+ currentPathname.current = pathname;
114
116
  reverse.current.lock = false;
115
117
  }, [pathname]);
116
118
  const value = useMemo(() => ({ handleLinkClick, overlayWrapper, overlayItems }), []);
@@ -47,7 +47,6 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
47
47
  console.log(checkTransitionFinish(transitionEndData.current, () => { }));
48
48
  state.current = 'navigating';
49
49
  window.scrollTo(0, window.history.state.scrollY ?? 0);
50
- console.log('pop transitionEnd called after scrollTo');
51
50
  resolveFn.current?.();
52
51
  console.log('pop transitionEnd called after resolveFn');
53
52
  setPromise(null);
@@ -86,6 +85,8 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
86
85
  }
87
86
  }).then(() => {
88
87
  console.log('after resolveNavigating', 'state:', state.current);
88
+ console.log('after resolveNavigating', 'currentPathname.current:', currentPathname.current);
89
+ console.log('window.location.pathname:', window.location.pathname);
89
90
  if (currentPathname.current === window.location.pathname) {
90
91
  console.log('currentPathname.current === window.location.pathname');
91
92
  transitionEnd({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "page-transition",
3
- "version": "0.1.0-beta.15",
3
+ "version": "0.1.0-beta.17",
4
4
  "description": "A page transition library for the Next.js App Router.",
5
5
  "license": "MIT",
6
6
  "files": [