Skip to content

Commit

Permalink
major v3.6.12
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSGJ committed Aug 27, 2024
1 parent fdc5615 commit 9b5f213
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,16 @@
### Updated

- Updated README.md Documentation made it more readable.

## v3.6.12

### Added (major changes)

- Added new import for PagesTopLoader

- Added new import for custom useRouter hook

### Updated

- Fixing for react js
- Updated README.md Documentation made it more readable.
6 changes: 3 additions & 3 deletions JSR.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function RootLayout({ children }) {
For rendering add `<PagesTopLoader />` to your `return()` in `MyApp()` (Recommended):

```js
import { PagesTopLoader } from '@thesgj/nextjs-toploader';
import { PagesTopLoader } from '@thesgj/nextjs-toploader/pages';

export default function MyApp({ Component, pageProps }) {
return (
Expand All @@ -83,7 +83,7 @@ For triggering TopLoader when using `useRouter` hook (app router):
```js
// Import the useRouter hook from @thesgj/nextjs-toploader to trigger the TopLoader

import { useRouter } from '@thesgj/nextjs-toploader';
import { useRouter } from '@thesgj/nextjs-toploader/app';
```

Then simply use it in your code for example:
Expand All @@ -98,7 +98,7 @@ router.push('/some-page');
For triggering TopLoader when using `useRouter` add `<PagesTopLoader />` to your `return()` in `MyApp()` :

```js
import { PagesTopLoader } from '@thesgj/nextjs-toploader';
import { PagesTopLoader } from '@thesgj/nextjs-toploader/pages';

export default function MyApp({ Component, pageProps }) {
return (
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function RootLayout({ children }) {
For rendering add `<PagesTopLoader />` to your `return()` in `MyApp()` (Recommended):

```js
import { PagesTopLoader } from 'nextjs-toploader';
import { PagesTopLoader } from 'nextjs-toploader/pages';

export default function MyApp({ Component, pageProps }) {
return (
Expand All @@ -74,7 +74,7 @@ For triggering TopLoader when using `useRouter` hook (app router):
```js
// Import the useRouter hook from nextjs-toploader to trigger the TopLoader

import { useRouter } from 'nextjs-toploader';
import { useRouter } from 'nextjs-toploader/app';
```

Then simply use it in your code for example:
Expand All @@ -89,7 +89,7 @@ router.push('/some-page');
For triggering TopLoader when using `useRouter` add `<PagesTopLoader />` to your `return()` in `MyApp()` :

```js
import { PagesTopLoader } from 'nextjs-toploader';
import { PagesTopLoader } from 'nextjs-toploader/pages';

export default function MyApp({ Component, pageProps }) {
return (
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,3 @@ NextTopLoader.propTypes = {
zIndex: PropTypes.number,
showAtBottom: PropTypes.bool,
};

export { useRouter } from './useRouter';
export { PagesTopLoader } from './PagesTopLoader';
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
]
},
"files": ["src/index.tsx"],
"files": ["src/index.tsx", "src/pages.tsx", "src/app.ts"],
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./dist", "node_modules"]
}
4 changes: 2 additions & 2 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ export const tsup: Options = {
target: 'es6',
clean: true,
dts: true,
entry: ['src/index.tsx'],
entry: ['src/index.tsx', 'src/pages.tsx', 'src/app.ts'],
keepNames: true,
minify: true,
sourcemap: true,
minify: true,
format: ['cjs'],
};

0 comments on commit 9b5f213

Please sign in to comment.