@graphcommerce/framer-next-pages 9.0.0-canary.115 → 9.0.0-canary.117
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/CHANGELOG.md +4 -0
- package/index.ts +0 -1
- package/package.json +5 -5
- package/hooks/usePageRouter.ts +0 -9
- package/utils/createRouterProxy.ts +0 -15
package/CHANGELOG.md
CHANGED
package/index.ts
CHANGED
|
@@ -5,7 +5,6 @@ export type { PageOptions, PageComponent } from './types'
|
|
|
5
5
|
|
|
6
6
|
export * from './hooks/useGo'
|
|
7
7
|
export * from './hooks/usePageContext'
|
|
8
|
-
export * from './hooks/usePageRouter'
|
|
9
8
|
export * from './hooks/useHistoryLink'
|
|
10
9
|
export * from './hooks/usePrevUp'
|
|
11
10
|
export * from './hooks/useScrollOffsetY'
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/framer-next-pages",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.0.0-canary.
|
|
5
|
+
"version": "9.0.0-canary.117",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.
|
|
16
|
-
"@graphcommerce/framer-utils": "^9.0.0-canary.
|
|
17
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.
|
|
18
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.117",
|
|
16
|
+
"@graphcommerce/framer-utils": "^9.0.0-canary.117",
|
|
17
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.117",
|
|
18
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.117",
|
|
19
19
|
"framer-motion": "^11.0.0",
|
|
20
20
|
"next": "*",
|
|
21
21
|
"react": "^18.2.0",
|
package/hooks/usePageRouter.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { NextRouter } from 'next/router'
|
|
2
|
-
|
|
3
|
-
export type OverrideProps = Partial<Pick<NextRouter, 'asPath' | 'pathname' | 'query' | 'locale'>>
|
|
4
|
-
|
|
5
|
-
export function createRouterProxy(router: NextRouter, override?: OverrideProps): NextRouter {
|
|
6
|
-
// We create an object with the current stale properties
|
|
7
|
-
const { asPath, pathname, query, locale } = router
|
|
8
|
-
|
|
9
|
-
const overrideProps: OverrideProps = { asPath, pathname, query, locale, ...override }
|
|
10
|
-
|
|
11
|
-
return new Proxy<NextRouter>(router, {
|
|
12
|
-
get: (target, prop: string, receiver) =>
|
|
13
|
-
overrideProps[prop] ?? Reflect.get(target, prop, receiver),
|
|
14
|
-
})
|
|
15
|
-
}
|