Skip to content

Commit

Permalink
Feature: Top progress bar feature added.
Browse files Browse the repository at this point in the history
  • Loading branch information
shuvo-me authored Feb 20, 2024
1 parent 16be51e commit e6fc10e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/components/TopProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use client'

import { AppProgressBar as ProgressBar } from 'next-nprogress-bar'
import React from 'react'

const TopProgressBar = () => {
return (
<>
<ProgressBar height="2px" color="#1B4DFF" options={{ showSpinner: false }} />
</>
)
}

export default TopProgressBar
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Inter } from 'next/font/google'
import { ReactNode } from 'react'
import Navbar from './components/Navbar'
import Footer from './components/Footer'
import TopProgressBar from './components/TopProgressBar'

const inter = Inter({ subsets: ['latin'], variable: '--font-inter' })

Expand All @@ -21,6 +22,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
<Navbar />
<main className="relative pt-20">{children}</main>
<Footer />
<TopProgressBar />
</body>
</html>
)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"typescript": "^5.3.3"
},
"devDependencies": {
"next-nprogress-bar": "^2.1.2",
"@babel/core": "^7.23.6",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
Expand Down

0 comments on commit e6fc10e

Please sign in to comment.