Skip to content

Commit b7f78fb

Browse files
committed
eslint error fix
1 parent b4aee4b commit b7f78fb

File tree

4 files changed

+46
-49
lines changed

4 files changed

+46
-49
lines changed

app/page.tsx

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { HeroTagLine } from "@/components/hero-tag-line";
22
import { HeroText } from "@/components/hero-text";
3-
import { buttonVariants } from "@/components/ui/button";
43
import { Spotlight } from "@/components/ui/spotlight-new";
54
import { ShinyButton } from "@/components/magicui/shiny-button";
65
import { page_routes } from "@/lib/routes-config";
7-
import { MoveUpRightIcon, TerminalSquareIcon, ArrowRight } from "lucide-react";
6+
import { TerminalSquareIcon, ArrowRight } from "lucide-react";
87
import Link from "next/link";
98

109
export default function Home() {
@@ -20,46 +19,46 @@ export default function Home() {
2019
xOffset={80}
2120
/>
2221
</div>
23-
22+
2423
<div className="relative flex sm:min-h-[87.5vh] min-h-[82vh] flex-col sm:items-center justify-center text-center sm:py-8 py-14 z-10">
25-
<div className="flex sm:flex-row flex-col items-center justify-center gap-4 mb-8">
26-
<Link
27-
href="https://github.com/Gourav2609/light-hooks"
28-
target="_blank"
29-
className="mb-5 sm:text-lg flex items-center gap-2 sm:-mt-12"
30-
>
31-
<HeroTagLine />
32-
</Link>
33-
</div>
34-
{/* <h1 className="text-[1.80rem] leading-8 sm:px-8 md:leading-[4.5rem] font-bold mb-4 sm:text-6xl text-left sm:text-center">
24+
<div className="flex sm:flex-row flex-col items-center justify-center gap-4 mb-8">
25+
<Link
26+
href="https://github.com/Gourav2609/light-hooks"
27+
target="_blank"
28+
className="mb-5 sm:text-lg flex items-center gap-2 sm:-mt-12"
29+
>
30+
<HeroTagLine />
31+
</Link>
32+
</div>
33+
{/* <h1 className="text-[1.80rem] leading-8 sm:px-8 md:leading-[4.5rem] font-bold mb-4 sm:text-6xl text-left sm:text-center">
3534
Light Hooks
3635
</h1> */}
37-
<HeroText />
38-
<p className="mb-8 md:text-lg text-base max-w-[1200px] text-muted-foreground text-left sm:text-center">
39-
Comprehensive documentation for light-hooks, a collection of lightweight
40-
and efficient React hooks designed to simplify state management and
41-
common patterns in modern React applications.
42-
</p>
43-
<div className="sm:flex sm:flex-row grid grid-cols-2 items-center sm;gap-5 gap-3 mb-8">
44-
<Link href={`/docs${page_routes[0].href}`}>
45-
<ShinyButton className="group px-4 py-3 text-lg font-semibold bg-black dark:bg-white text-white dark:text-black border-white/20 dark:border-black/20 hover:shadow-lg hover:shadow-black/10 dark:hover:shadow-lg dark:hover:shadow-black/10">
46-
<span className="flex items-center gap-2">
47-
Get Started
48-
<ArrowRight className="w-5 h-5 transition-transform duration-300 ease-out group-hover:translate-x-1" />
49-
</span>
50-
</ShinyButton>
51-
</Link>
52-
<Link
53-
href="/blog"
54-
className="group px-6 py-3 text-md font-medium underline underline-offset-4 decoration-2 transition-all duration-300 hover:bg-muted hover:no-underline rounded-lg"
55-
>
56-
Read Blog
57-
</Link>
58-
</div>
59-
<span className="sm:flex hidden flex-row items-start sm:gap-2 gap-0.5 text-muted-foreground text-md mt-5 -mb-12 max-[800px]:mb-12 font-code sm:text-base text-sm font-medium">
60-
<TerminalSquareIcon className="w-5 h-5 sm:mr-1 mt-0.5" />
61-
{"npm install light-hooks"}
62-
</span>
36+
<HeroText />
37+
<p className="mb-8 md:text-lg text-base max-w-[1200px] text-muted-foreground text-left sm:text-center">
38+
Comprehensive documentation for light-hooks, a collection of lightweight
39+
and efficient React hooks designed to simplify state management and
40+
common patterns in modern React applications.
41+
</p>
42+
<div className="sm:flex sm:flex-row grid grid-cols-2 items-center sm;gap-5 gap-3 mb-8">
43+
<Link href={`/docs${page_routes[0].href}`}>
44+
<ShinyButton className="group px-4 py-3 text-lg font-semibold bg-black dark:bg-white text-white dark:text-black border-white/20 dark:border-black/20 hover:shadow-lg hover:shadow-black/10 dark:hover:shadow-lg dark:hover:shadow-black/10">
45+
<span className="flex items-center gap-2">
46+
Get Started
47+
<ArrowRight className="w-5 h-5 transition-transform duration-300 ease-out group-hover:translate-x-1" />
48+
</span>
49+
</ShinyButton>
50+
</Link>
51+
<Link
52+
href="/blog"
53+
className="group px-6 py-3 text-md font-medium underline underline-offset-4 decoration-2 transition-all duration-300 hover:bg-muted hover:no-underline rounded-lg"
54+
>
55+
Read Blog
56+
</Link>
57+
</div>
58+
<span className="sm:flex hidden flex-row items-start sm:gap-2 gap-0.5 text-muted-foreground text-md mt-5 -mb-12 max-[800px]:mb-12 font-code sm:text-base text-sm font-medium">
59+
<TerminalSquareIcon className="w-5 h-5 sm:mr-1 mt-0.5" />
60+
{"npm install light-hooks"}
61+
</span>
6362
</div>
6463
</>
6564
);

components/magicui/interactive-hover-button.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import React from "react";
22
import { ArrowRight } from "lucide-react";
33
import { cn } from "@/lib/utils";
44

5-
interface InteractiveHoverButtonProps
6-
extends React.ButtonHTMLAttributes<HTMLButtonElement> {}
5+
type InteractiveHoverButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement>
76

87
export const InteractiveHoverButton = React.forwardRef<
98
HTMLButtonElement,

components/navbar.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ModeToggle } from "@/components/theme-toggle";
2-
import { GithubIcon, TwitterIcon, CommandIcon, Star } from "lucide-react";
2+
import { GithubIcon, CommandIcon } from "lucide-react";
33
import Link from "next/link";
44
import { buttonVariants } from "./ui/button";
55
import { ShinyButton } from "@/components/magicui/shiny-button";
@@ -8,7 +8,6 @@ import { SheetLeftbar } from "./leftbar";
88
import { page_routes } from "@/lib/routes-config";
99
import { SheetClose } from "@/components/ui/sheet";
1010
import AlgoliaSearch from "./algolia-search";
11-
// import { GitHubStars } from "./github-stars";
1211

1312
export const NAVLINKS = [
1413
{
@@ -48,7 +47,7 @@ export function Navbar() {
4847
</div>
4948

5049
<div className="flex items-center sm:justify-normal justify-between sm:gap-3 ml-1 sm:w-fit w-[90%]">
51-
50+
5251
<Link
5352
href="https://github.com/Gourav2609/light-hooks"
5453
target="_blank"

components/ui/hover-border-gradient.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use client";
2-
import React, { useState, useEffect, useRef } from "react";
2+
import React, { useState, useEffect } from "react";
33

44
import { motion } from "motion/react";
55
import { cn } from "@/lib/utils";
@@ -26,14 +26,14 @@ export function HoverBorderGradient({
2626
const [hovered, setHovered] = useState<boolean>(false);
2727
const [direction, setDirection] = useState<Direction>("TOP");
2828

29-
const rotateDirection = (currentDirection: Direction): Direction => {
29+
const rotateDirection = React.useCallback((currentDirection: Direction): Direction => {
3030
const directions: Direction[] = ["TOP", "LEFT", "BOTTOM", "RIGHT"];
3131
const currentIndex = directions.indexOf(currentDirection);
3232
const nextIndex = clockwise
3333
? (currentIndex - 1 + directions.length) % directions.length
3434
: (currentIndex + 1) % directions.length;
3535
return directions[nextIndex];
36-
};
36+
}, [clockwise]);
3737

3838
const movingMap: Record<Direction, string> = {
3939
TOP: "radial-gradient(20.7% 50% at 50% 0%, hsl(0, 0%, 100%) 0%, rgba(255, 255, 255, 0) 100%)",
@@ -54,10 +54,10 @@ export function HoverBorderGradient({
5454
}, duration * 1000);
5555
return () => clearInterval(interval);
5656
}
57-
}, [hovered]);
57+
}, [hovered, duration, rotateDirection]);
5858
return (
5959
<Tag
60-
onMouseEnter={(event: React.MouseEvent<HTMLDivElement>) => {
60+
onMouseEnter={() => {
6161
setHovered(true);
6262
}}
6363
onMouseLeave={() => setHovered(false)}

0 commit comments

Comments
 (0)