Skip to content

Commit e0e8e1d

Browse files
authored
Merge pull request #83 from afsar-dev/dev
draw cursor to splash-cursor
2 parents 62aec54 + 1cb39e4 commit e0e8e1d

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

src/app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { AppProvider } from "@/context/AppContext";
1212
import Navbar from "@/components/layout/Navbar";
1313
import Footer from "@/components/layout/Footer";
1414
import Banner from "@/components/ui/Banner";
15-
import DrawCursorDemo from "@/components/common/DrawCursorDemo";
15+
import SplashCursorDemo from "@/components/common/SplashCursorDemo";
1616

1717
const nunito = Nunito({
1818
variable: "--font-nunito",
@@ -99,7 +99,7 @@ export default function RootLayout({
9999
<ThemeProvider>
100100
<Toaster />
101101
<NProgressProvider />
102-
<DrawCursorDemo />
102+
<SplashCursorDemo />
103103
<Banner />
104104
<Navbar />
105105
<MainContent>{children}</MainContent>

src/components/common/DrawCursorDemo.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"use client";
2+
import React from "react";
3+
import { usePathname } from "next/navigation";
4+
import SplashCursor from "../nurui/splash-cursor";
5+
6+
const SplashCursorDemo = () => {
7+
const pathName = usePathname();
8+
if (pathName.includes("docs") || pathName.includes("preview")) return null;
9+
return <SplashCursor />;
10+
};
11+
12+
export default SplashCursorDemo;

0 commit comments

Comments
 (0)