page-transition 0.1.0-beta.29 → 0.1.0-beta.30

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.
@@ -63,6 +63,12 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
63
63
  useUse.current = false;
64
64
  }
65
65
  });
66
+ const debug = useTransitionEndObj({
67
+ transitionEndData,
68
+ fn: () => {
69
+ console.log('debug');
70
+ }
71
+ });
66
72
  useEffect(() => {
67
73
  const handlePopstate = () => {
68
74
  setPromise(new Promise((resolve, reject) => {
@@ -99,7 +105,7 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
99
105
  }
100
106
  if (state.current === 'entering') {
101
107
  transitionEnd({
102
- transitionEndObj: pop,
108
+ transitionEndObj: debug,
103
109
  transitionEndHandler,
104
110
  reverse,
105
111
  delayStep
@@ -119,9 +125,14 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
119
125
  transitionProperty: transitionEndData.current.transitionProperty,
120
126
  target: 0
121
127
  }).then(() => {
128
+ if (state.current !== 'entering') {
129
+ console.log('state.current !== entering');
130
+ console.log('state:', state.current);
131
+ return;
132
+ }
122
133
  console.log('updatePlaybackRate done');
123
134
  transitionEnd({
124
- transitionEndObj: pop,
135
+ transitionEndObj: afterExit,
125
136
  transitionEndHandler,
126
137
  reverse,
127
138
  delayStep
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "page-transition",
3
- "version": "0.1.0-beta.29",
3
+ "version": "0.1.0-beta.30",
4
4
  "description": "A page transition library for the Next.js App Router.",
5
5
  "license": "MIT",
6
6
  "files": [