page-transition 0.1.0-beta.14 → 0.1.0-beta.16

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,8 @@ export function CssTransitionProvider({ header, options, children }) {
110
110
  state.current = 'entering';
111
111
  }
112
112
  });
113
- currentPathname.current = pathname;
113
+ if (state.current === 'navigating')
114
+ currentPathname.current = pathname;
114
115
  reverse.current.lock = false;
115
116
  }, [pathname]);
116
117
  const value = useMemo(() => ({ handleLinkClick, overlayWrapper, overlayItems }), []);
@@ -43,10 +43,15 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
43
43
  const pop = useTransitionEndObj({
44
44
  transitionEndData,
45
45
  fn: () => {
46
+ console.log('pop transitionEnd called');
47
+ console.log(checkTransitionFinish(transitionEndData.current, () => { }));
46
48
  state.current = 'navigating';
47
49
  window.scrollTo(0, window.history.state.scrollY ?? 0);
50
+ console.log('pop transitionEnd called after scrollTo');
48
51
  resolveFn.current?.();
52
+ console.log('pop transitionEnd called after resolveFn');
49
53
  setPromise(null);
54
+ useUse.current = false;
50
55
  }
51
56
  });
52
57
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "page-transition",
3
- "version": "0.1.0-beta.14",
3
+ "version": "0.1.0-beta.16",
4
4
  "description": "A page transition library for the Next.js App Router.",
5
5
  "license": "MIT",
6
6
  "files": [