Skip to content

Commit 1440024

Browse files
committed
🚀 Add : Experimenting
1 parent 7652577 commit 1440024

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

pages/index.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,20 @@ import { RoughNotation, RoughNotationGroup } from "react-rough-notation";
1515
import { useIsFontReady } from "@/lib/useIsFontReady";
1616
import { LinkPreview } from "@/components/LinkPreview";
1717
import { StaticLinkPreview } from "@/components/StaticLinkPreview";
18+
import { useTheme } from "next-themes";
1819

1920
export default function Home() {
2021
const [colors, setColors] = useState([]);
22+
// const [tempInterval, setTempInterval] = useState(null);
23+
24+
let tempInterval;
2125

2226
const isFontReady = useIsFontReady();
27+
const { theme, setTheme } = useTheme();
28+
29+
const play = () => {
30+
setTheme(theme === "dark" ? "light" : "dark");
31+
};
2332

2433
useEffect(() => {
2534
setColors(shuffleArray(LIGHT_COLORS));
@@ -87,7 +96,13 @@ export default function Home() {
8796
</RoughNotation>{" "}
8897
while you're here. <br />I write about technology, learning and{" "}
8998
<StaticLinkPreview url="https://manuarora.in/radhey-bhaiya.jpeg">
90-
<span className="text-black dark:text-white">memes.</span>
99+
<span
100+
onMouseEnter={play}
101+
onMouseLeave={play}
102+
className="text-black dark:text-white"
103+
>
104+
memes.
105+
</span>
91106
</StaticLinkPreview>
92107
</h2>
93108
</RoughNotationGroup>

0 commit comments

Comments
 (0)