Skip to content

Commit

Permalink
cursor variant support on home page
Browse files Browse the repository at this point in the history
  • Loading branch information
No0ne003 committed May 12, 2024
1 parent d5f08f7 commit 46b16bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
16 changes: 6 additions & 10 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ function App() {
<Route path="React-Projects">
<Route
index
element={<HomeWithCursor cursorVariant={cursorVariant} />}
element={
<>
{" "}
<Home setCursorVariant={setCursorVariant} /> <Cursor cursorVariant={cursorVariant} />{" "}
</>
}
/>

{/* Accordion component */}
Expand Down Expand Up @@ -105,13 +110,4 @@ function App() {
);
}

function HomeWithCursor({ cursorVariant }) {
return (
<>
<Home />
<Cursor cursorVariant={cursorVariant} />
</>
);
}

export default App;
4 changes: 1 addition & 3 deletions src/pages/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { useState } from "react";
import { projects } from "@/data/projects";
import { Link } from "react-router-dom";

function Home() {
const [cursorVariant, setCursorVariant] = useState("default");
function Home({ setCursorVariant }) {

return (
<div className="container flex flex-col gap-3 justify-start items-center py-10">
Expand Down

0 comments on commit 46b16bd

Please sign in to comment.