Skip to content

Commit 8b808dc

Browse files
committed
Fix linter.
1 parent ff309df commit 8b808dc

5 files changed

Lines changed: 8 additions & 19 deletions

File tree

components/docs/search/search-box.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ const SearchBox = ({
262262
}}
263263
>
264264
{results.length > 0 ? (
265-
<AnimatePresence mode="popLayout" initial={false}>
265+
<AnimatePresence initial={false} mode="popLayout">
266266
<motion.div
267267
animate="visible"
268268
className="scrollbar-hide max-h-96 overflow-y-auto"

components/docs/search/search-modal.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ export function SearchModal({ isOpen, onClose, triggerRef }: SearchModalProps) {
8080
opacity: 1,
8181
y: 0,
8282
scale: 1,
83-
transition: prefersReducedMotion
84-
? { duration: 0 }
85-
: springResultTransition,
83+
transition: prefersReducedMotion ? { duration: 0 } : springResultTransition,
8684
},
8785
exit: {
8886
opacity: 0,
@@ -360,7 +358,7 @@ export function SearchModal({ isOpen, onClose, triggerRef }: SearchModalProps) {
360358

361359
{/* Search Results */}
362360
{showResults && !isLoading && !isInitializing && (
363-
<AnimatePresence mode="popLayout" initial={false}>
361+
<AnimatePresence initial={false} mode="popLayout">
364362
<motion.div
365363
animate="visible"
366364
className="p-2"

components/docs/sidebar/sidebar-wrapper.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
import Lenis from "lenis";
44
import type { FC } from "react";
55
import { useEffect, useRef, useState } from "react";
6-
7-
import DocSidebar from "./doc-sidebar";
86
import { SearchModal } from "@/components/docs/search/search-modal";
97
import { SearchTrigger } from "@/components/docs/search/search-trigger";
8+
import DocSidebar from "./doc-sidebar";
109
import type { DocItem } from "./types";
1110

1211
interface SidebarWrapperProps {

components/ui/mdx/mdx-components.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ import { FileTree, FileTreeItem } from "@/components/ui/mdx/file-tree";
1616
import { Heading } from "@/components/ui/mdx/heading";
1717
import { Inline } from "@/components/ui/mdx/inline";
1818
import { LinkPreview } from "@/components/ui/mdx/link-preview";
19-
import { MdxLink } from "@/components/ui/mdx/mdx-link";
2019
import { MdxImage } from "@/components/ui/mdx/mdx-image";
20+
import { MdxLink } from "@/components/ui/mdx/mdx-link";
2121
import { Step, Steps } from "@/components/ui/mdx/steps";
22-
import { cn } from "@/lib/utils";
2322

2423
type HeadingProps = HTMLAttributes<HTMLHeadingElement>;
2524

components/ui/mdx/mdx-link.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import type { AnchorHTMLAttributes, ReactNode } from "react";
2-
31
import { ArrowUpRight, Link as LinkIcon } from "lucide-react";
42
import Link from "next/link";
3+
import type { AnchorHTMLAttributes, ReactNode } from "react";
54

65
import { cn } from "@/lib/utils";
76

@@ -25,9 +24,7 @@ export function MdxLink({ href = "", children, className, ...rest }: MdxLinkProp
2524

2625
const content = (
2726
<span className="relative inline-flex items-center gap-1.5">
28-
<span className="relative">
29-
{children}
30-
</span>
27+
<span className="relative">{children}</span>
3128
{isExternal || isSpecial ? (
3229
<ArrowUpRight
3330
aria-hidden="true"
@@ -54,11 +51,7 @@ export function MdxLink({ href = "", children, className, ...rest }: MdxLinkProp
5451
}
5552

5653
return (
57-
<Link
58-
className={cn(baseClassName, underlineClassName, className)}
59-
href={href}
60-
{...rest}
61-
>
54+
<Link className={cn(baseClassName, underlineClassName, className)} href={href} {...rest}>
6255
{content}
6356
</Link>
6457
);

0 commit comments

Comments
 (0)