feat: nprogress bar
This commit is contained in:
parent
f2745d713c
commit
d921885f1b
24
package-lock.json
generated
24
package-lock.json
generated
|
@ -11,6 +11,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tailwindcss/forms": "^0.4.0",
|
"@tailwindcss/forms": "^0.4.0",
|
||||||
"@tailwindcss/typography": "^0.5.1",
|
"@tailwindcss/typography": "^0.5.1",
|
||||||
|
"@types/nprogress": "^0.2.0",
|
||||||
"@types/react": "^17.0.39",
|
"@types/react": "^17.0.39",
|
||||||
"airtable": "^0.11.1",
|
"airtable": "^0.11.1",
|
||||||
"algoliasearch": "^4.10.3",
|
"algoliasearch": "^4.10.3",
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
"mongodb": "^3.6.6",
|
"mongodb": "^3.6.6",
|
||||||
"multiselect-react-dropdown": "^2.0.17",
|
"multiselect-react-dropdown": "^2.0.17",
|
||||||
"next": "12",
|
"next": "12",
|
||||||
|
"nprogress": "^0.2.0",
|
||||||
"open": "^7.3.1",
|
"open": "^7.3.1",
|
||||||
"papaparse": "^5.3.0",
|
"papaparse": "^5.3.0",
|
||||||
"pg": "^8.7.3",
|
"pg": "^8.7.3",
|
||||||
|
@ -1759,6 +1761,12 @@
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.28.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.28.tgz",
|
||||||
"integrity": "sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g=="
|
"integrity": "sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g=="
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/nprogress": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"resolved": "https://npm.team.kocherga.club/@types%2fnprogress/-/nprogress-0.2.0.tgz",
|
||||||
|
"integrity": "sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/parse-json": {
|
"node_modules/@types/parse-json": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://npm.team.kocherga.club/@types%2fparse-json/-/parse-json-4.0.0.tgz",
|
"resolved": "https://npm.team.kocherga.club/@types%2fparse-json/-/parse-json-4.0.0.tgz",
|
||||||
|
@ -33638,6 +33646,12 @@
|
||||||
"set-blocking": "~2.0.0"
|
"set-blocking": "~2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/nprogress": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"resolved": "https://npm.team.kocherga.club/nprogress/-/nprogress-0.2.0.tgz",
|
||||||
|
"integrity": "sha1-y480xTIT2JVyP8urkH6UIq28r7E=",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/nth-check": {
|
"node_modules/nth-check": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz",
|
||||||
|
@ -38514,6 +38528,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.28.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.28.tgz",
|
||||||
"integrity": "sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g=="
|
"integrity": "sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g=="
|
||||||
},
|
},
|
||||||
|
"@types/nprogress": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"resolved": "https://npm.team.kocherga.club/@types%2fnprogress/-/nprogress-0.2.0.tgz",
|
||||||
|
"integrity": "sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A=="
|
||||||
|
},
|
||||||
"@types/parse-json": {
|
"@types/parse-json": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://npm.team.kocherga.club/@types%2fparse-json/-/parse-json-4.0.0.tgz",
|
"resolved": "https://npm.team.kocherga.club/@types%2fparse-json/-/parse-json-4.0.0.tgz",
|
||||||
|
@ -62328,6 +62347,11 @@
|
||||||
"set-blocking": "~2.0.0"
|
"set-blocking": "~2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nprogress": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"resolved": "https://npm.team.kocherga.club/nprogress/-/nprogress-0.2.0.tgz",
|
||||||
|
"integrity": "sha1-y480xTIT2JVyP8urkH6UIq28r7E="
|
||||||
|
},
|
||||||
"nth-check": {
|
"nth-check": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz",
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tailwindcss/forms": "^0.4.0",
|
"@tailwindcss/forms": "^0.4.0",
|
||||||
"@tailwindcss/typography": "^0.5.1",
|
"@tailwindcss/typography": "^0.5.1",
|
||||||
|
"@types/nprogress": "^0.2.0",
|
||||||
"@types/react": "^17.0.39",
|
"@types/react": "^17.0.39",
|
||||||
"airtable": "^0.11.1",
|
"airtable": "^0.11.1",
|
||||||
"algoliasearch": "^4.10.3",
|
"algoliasearch": "^4.10.3",
|
||||||
|
@ -51,6 +52,7 @@
|
||||||
"mongodb": "^3.6.6",
|
"mongodb": "^3.6.6",
|
||||||
"multiselect-react-dropdown": "^2.0.17",
|
"multiselect-react-dropdown": "^2.0.17",
|
||||||
"next": "12",
|
"next": "12",
|
||||||
|
"nprogress": "^0.2.0",
|
||||||
"open": "^7.3.1",
|
"open": "^7.3.1",
|
||||||
"papaparse": "^5.3.0",
|
"papaparse": "^5.3.0",
|
||||||
"pg": "^8.7.3",
|
"pg": "^8.7.3",
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
|
import 'nprogress/nprogress.css';
|
||||||
import '../styles/main.css';
|
import '../styles/main.css';
|
||||||
|
|
||||||
|
import Router from 'next/router';
|
||||||
|
import NProgress from 'nprogress';
|
||||||
|
|
||||||
|
Router.events.on("routeChangeStart", () => NProgress.start());
|
||||||
|
Router.events.on("routeChangeComplete", () => NProgress.done());
|
||||||
|
Router.events.on("routeChangeError", () => NProgress.done());
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }) {
|
function MyApp({ Component, pageProps }) {
|
||||||
return <Component {...pageProps} />;
|
return <Component {...pageProps} />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user