Skip to content

Commit 920e81a

Browse files
committed
fix: resolve Next.js Link type mismatches by casting with any and updating tsconfig configuration
1 parent a86a070 commit 920e81a

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/components/admin/AdminSidebar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ export function AdminSidebar() {
9494
return (
9595
<Link
9696
key={item.href}
97-
href={item.href}
97+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
98+
href={item.href as any}
9899
onClick={() => setIsOpen(false)}
99100
className={`flex items-center gap-4 px-4 py-3 text-xs uppercase tracking-[0.15em] font-sans transition-all duration-300 ${
100101
isActive

src/components/atoms/Text/Text.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { Text } from "./Text.variant";
88

99
const CustomLinkComponent = forwardRef<
1010
HTMLAnchorElement,
11-
LinkProps & { className?: string }
11+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
12+
LinkProps<any> & { className?: string }
1213
>(({ className, href, ...props }, ref) => (
1314
<Link
1415
href={href}

src/components/molecules/Footer.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
"use client";
23

34
import { memo } from "react";
@@ -54,7 +55,7 @@ function Footer() {
5455
{exploreMenus.map((menu) => (
5556
<Link
5657
key={menu.name}
57-
href={menu.route}
58+
href={menu.route as any}
5859
className="group relative text-sm text-zinc-400 hover:text-white transition-colors duration-300 w-fit"
5960
>
6061
{menu.name}
@@ -70,7 +71,7 @@ function Footer() {
7071
{companyMenus.map((menu) => (
7172
<Link
7273
key={menu.name}
73-
href={menu.route}
74+
href={menu.route as any}
7475
className="group relative text-sm text-zinc-400 hover:text-white transition-colors duration-300 w-fit"
7576
>
7677
{menu.name}
@@ -86,7 +87,7 @@ function Footer() {
8687
{socialMenus.map((menu) => (
8788
<Link
8889
key={menu.name}
89-
href={menu.route}
90+
href={menu.route as any}
9091
target="_blank"
9192
rel="noopener noreferrer"
9293
className="group relative text-sm text-zinc-400 hover:text-white transition-colors duration-300 w-fit"

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@
4040
},
4141
"include": [
4242
"next-env.d.ts",
43+
"ts-reset.d.ts",
4344
"**/*.ts",
4445
"**/*.tsx",
4546
".next/types/**/*.ts",
4647
".next/dev/types/**/*.ts"
4748
],
4849
"exclude": [
49-
"node_modules"
50+
"node_modules/**/*"
5051
]
5152
}

0 commit comments

Comments
 (0)