Skip to content

Commit

Permalink
Add progress bar for page loading
Browse files Browse the repository at this point in the history
  • Loading branch information
neokry committed Aug 21, 2023
1 parent f3dcfaf commit 1bcdd6e
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 38 deletions.
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"lodash": "^4.17.21",
"multiformats": "9.9.0",
"next": "^13.0.3",
"nextjs-progressbar": "^0.0.16",
"raw-loader": "^4.0.2",
"react": "^18.2.0",
"react-content-loader": "^6.0.2",
Expand Down
9 changes: 9 additions & 0 deletions apps/web/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import '@zoralabs/zord/index.css'
import { VercelAnalytics } from 'analytics'
import type { NextPage } from 'next'
import type { AppProps } from 'next/app'
import NextNProgress from 'nextjs-progressbar'
import type { ReactElement, ReactNode } from 'react'
import { SWRConfig } from 'swr'
import { WagmiConfig } from 'wagmi'
Expand Down Expand Up @@ -34,6 +35,14 @@ function App({ Component, pageProps, err }: AppPropsWithLayout) {
<WagmiConfig client={client}>
<RainbowKitProvider chains={chains} appInfo={{ disclaimer: Disclaimer }}>
<SWRConfig value={{ fallback }}>
<NextNProgress
color={'#008BFF'}
startPosition={0.125}
stopDelayMs={200}
height={2}
showOnShallow={false}
options={{ showSpinner: false }}
/>
{getLayout(<Component {...pageProps} err={err} />)}
</SWRConfig>
<NetworkController.Mainnet>
Expand Down
132 changes: 94 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1bcdd6e

Please sign in to comment.