From 323788e9a3cf42c7786e82597d01921e1c3b1b97 Mon Sep 17 00:00:00 2001 From: likiosliu Date: Tue, 24 Mar 2026 19:51:29 +0800 Subject: [PATCH] fix: replace `any` types with proper types in contact form component - Replace `any` props type with `React.ComponentProps<"svg">` plus explicit named props - Replace `any` tuple type with `[number, number]` in squares mapper Closes #912 --- surfsense_web/components/contact/contact-form.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/surfsense_web/components/contact/contact-form.tsx b/surfsense_web/components/contact/contact-form.tsx index 967c1c524..03e4118de 100644 --- a/surfsense_web/components/contact/contact-form.tsx +++ b/surfsense_web/components/contact/contact-form.tsx @@ -161,7 +161,7 @@ export const FeatureIconContainer = ({ ); }; -export const Grid = ({ pattern, size }: { pattern?: number[][]; size?: number }) => { +export const Grid = ({ pattern, size }: { pattern?: [number, number][]; size?: number }) => { const p = pattern ?? [ [9, 3], [8, 5], @@ -185,7 +185,7 @@ export const Grid = ({ pattern, size }: { pattern?: number[][]; size?: number }) ); }; -export function GridPattern({ width, height, x, y, squares, ...props }: any) { +export function GridPattern({ width, height, x, y, squares, ...props }: React.ComponentProps<"svg"> & { width: number; height: number; x: string | number; y: string | number; squares?: [number, number][] }) { const patternId = useId(); return ( @@ -205,7 +205,7 @@ export function GridPattern({ width, height, x, y, squares, ...props }: any) { {squares && (