Skip to content

Commit

Permalink
feat: top loader
Browse files Browse the repository at this point in the history
added a loader at the top for better ux
  • Loading branch information
Abhish7k committed Jul 28, 2024
1 parent 472ef20 commit 5779e99
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ThemeProvider } from "../components/theme-provider";
import Navbar from "../components/Navbar";
import Footer from "../components/Footer";
import AuthProvider from "../context/AuthProvider";
import NextTopLoader from "nextjs-toploader";

const inter = Inter({ subsets: ["latin"] });

Expand All @@ -23,6 +24,7 @@ export default function RootLayout({ children }) {
enableSystem
disableTransitionOnChange
>
<NextTopLoader />
<Navbar />
<main className="mx-auto mt-10">{children}</main>
<Footer />
Expand Down
8 changes: 6 additions & 2 deletions components/FeatureSection/FeatureSectionGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export const SkeletonOne = () => {
width={1000}
height={1000}
className="full rounded-sm"
draggable="false"
/>
</div>
</div>
Expand Down Expand Up @@ -149,6 +150,7 @@ export const SkeletonThree = () => {
width={800}
height={800}
className="mt-2 object-cover object-center rounded-sm blur-none group-hover/image:blur-md transition-all duration-200"
draggable="false"
/>
</div>
</div>
Expand Down Expand Up @@ -202,10 +204,11 @@ export const SkeletonTwo = () => {
>
<Image
src={image}
alt="bali images"
alt=""
width="500"
height="500"
className="rounded-lg h-20 w-20 md:h-40 md:w-40 object-cover flex-shrink-0"
draggable="false"
/>
</motion.div>
))}
Expand All @@ -224,10 +227,11 @@ export const SkeletonTwo = () => {
>
<Image
src={image}
alt="bali images"
alt=""
width="500"
height="500"
className="rounded-lg h-20 w-20 md:h-40 md:w-40 object-cover flex-shrink-0"
draggable="false"
/>
</motion.div>
))}
Expand Down
1 change: 1 addition & 0 deletions components/HeroSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default function HeroSection() {
width={1200}
className="mx-auto shadow-lg rounded-2xl"
alt=""
draggable={false}
/>
</div>
</motion.section>
Expand Down
2 changes: 1 addition & 1 deletion components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const Navbar = () => {
{/* buttons */}
<div className="hidden lg:flex items-center gap-5 transition-all">
<Link href="https://discord.gg/AB2vCdyw">
<Button variant="outline" className="px-5 rounded-md border-indigo-800">
<Button variant="outline" className="px-5 rounded-md">
Join Community
</Button>
</Link>
Expand Down
25 changes: 25 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"next-auth": "^4.24.7",
"next-sanity": "^9.4.2",
"next-themes": "^0.3.0",
"nextjs-toploader": "^1.6.12",
"prisma": "^5.16.1",
"react": "^18",
"react-dom": "^18",
Expand Down

0 comments on commit 5779e99

Please sign in to comment.