Skip to content

Commit

Permalink
Merge branch 'main' into fix-RyanClementsHaxgh-100
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanClementsHax committed Nov 4, 2022
2 parents ed01a74 + b72a426 commit 806530a
Show file tree
Hide file tree
Showing 5 changed files with 1,706 additions and 5,104 deletions.
5 changes: 1 addition & 4 deletions package.json
Expand Up @@ -50,7 +50,7 @@
"sass-loader": "^12.4.0",
"semver": "^7.3.5",
"tsconfig-paths": "^4.0.0",
"tsconfig-paths-webpack-plugin": "^3.5.2"
"tsconfig-paths-webpack-plugin": "^4.0.0"
},
"devDependencies": {
"@storybook/addon-actions": "^6.4.13",
Expand All @@ -69,9 +69,6 @@
"husky": "^7.0.4",
"lint-staged": "^12.1.2",
"next": "^12.0.7",
"nextv10": "npm:next@10.0.0",
"nextv11": "npm:next@11.0.0",
"nextv9": "npm:next@9.0.0",
"prettier": "^2.5.1",
"react": "^17.0.2",
"semantic-release": "^19.0.3",
Expand Down
6 changes: 2 additions & 4 deletions src/routing/decorator.tsx
@@ -1,7 +1,6 @@
// this will be aliased by webpack at runtime (this is just for typing)
import { RouterContext } from './resolved-router-context'
// this will be aliased by webpack at runtime (this is just for typing)
import Router from './resolved-router'
import Router from 'next/router'
import { action } from '@storybook/addon-actions'
import { StoryContext } from '@storybook/addons'

Expand Down Expand Up @@ -58,8 +57,7 @@ export const RouterDecorator = (
} as NonNullable<typeof Router.router>

return (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
<RouterContext.Provider value={Router.router as any}>
<RouterContext.Provider value={Router.router}>
<Story />
</RouterContext.Provider>
)
Expand Down
11 changes: 1 addition & 10 deletions src/routing/resolved-router-context.ts
@@ -1,12 +1,3 @@
// this file will be aliased by webpack at runtime (this is just for typing)

import { RouterContext as RouterContextV12 } from 'next/dist/shared/lib/router-context'
import { RouterContext as RouterContextV11 } from 'nextv11/dist/next-server/lib/router-context'
import { RouterContext as RouterContextV10 } from 'nextv10/dist/next-server/lib/router-context'
import { RouterContext as RouterContextV9 } from 'next-server/dist/lib/router-context'

export const RouterContext:
| typeof RouterContextV12
| typeof RouterContextV11
| typeof RouterContextV10
| typeof RouterContextV9 = RouterContextV12
export { RouterContext } from 'next/dist/shared/lib/router-context'
14 changes: 0 additions & 14 deletions src/routing/resolved-router.ts

This file was deleted.

0 comments on commit 806530a

Please sign in to comment.