Skip to content

Commit

Permalink
fix: adjusted imports and exports
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlingX committed May 27, 2022
1 parent 427548c commit eefd0e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ API: https://bowlingx.github.io/geschichte/api/index.html
```typescript jsx

import { pm, factoryParameters, serializers } from 'geschichte'
import GeschichteForHistory from 'geschichte/adapters/historyjs'
import GeschichteForHistory from 'geschichte/historyjs'
import { createBrowserHistory } from 'history'

const parameterConfig = {
Expand Down Expand Up @@ -96,7 +96,7 @@ Nextjs support is build in, but requires a different Adapter.
/** _app.tsx */

import React, { FC, memo, ReactNode } from 'react'
import GeschichteForNextjs from 'geschichte/adapters/nextjs'
import GeschichteForNextjs from 'geschichte/nextjs'
import type { AppProps } from 'next/app'

function App({ Component, pageProps }: AppProps) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"import": "./build/mjs/index.js",
"require": "./build/cjs/index.js"
},
"./adapters/nextjs": {
"./nextjs": {
"types": "./build/mjs/lib/adapters/nextjs.d.ts",
"import": "./build/mjs/lib/adapters/nextjs.js",
"require": "./build/cjs/lib/adapters/nextjs.js"
},
"./adapters/historyjs": {
"./historyjs": {
"types": "./build/mjs/lib/adapters/historyjs.d.ts",
"import": "./build/mjs/lib/adapters/historyjs.js",
"require": "./build/cjs/lib/adapters/historyjs.js"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/adapters/nextjs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import React, {
useState,
} from 'react'
// tslint:disable-next-line:no-submodule-imports
import Router, { useRouter } from 'next/router'
import Router, { useRouter } from 'next/router.js'
// tslint:disable-next-line:no-submodule-imports
import shallow from 'zustand/shallow'
import { StoreState } from '../middleware'
import { HistoryManagement, StoreContext, useGeschichte } from '../store'

const split = (url: string) => url.split('?')
const split = (url?: string) => url?.split('?') || []

interface TransitionOptions {
readonly shallow?: boolean
Expand Down

0 comments on commit eefd0e8

Please sign in to comment.