aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/FormField.astro2
-rw-r--r--src/components/react/ErrorBoundary.tsx2
-rw-r--r--src/components/react/SearchDialog.tsx5
3 files changed, 3 insertions, 6 deletions
diff --git a/src/components/FormField.astro b/src/components/FormField.astro
index 9b9d95c..dcec8ed 100644
--- a/src/components/FormField.astro
+++ b/src/components/FormField.astro
@@ -54,7 +54,7 @@ const fieldType = field.type as astroHTML.JSX.HTMLInputTypeAttribute
case 'checkbox':
return (
<div class="flex flex-col gap-4 pl-1">
- {field.options?.map((opt, index) => (
+ {field.options?.map((opt, _) => (
<label class="cursor-pointer">
<input
type={fieldType}
diff --git a/src/components/react/ErrorBoundary.tsx b/src/components/react/ErrorBoundary.tsx
index 4945094..30d44a4 100644
--- a/src/components/react/ErrorBoundary.tsx
+++ b/src/components/react/ErrorBoundary.tsx
@@ -1,4 +1,4 @@
-import React, { Component } from 'react'
+import { Component } from 'react'
import type { ErrorInfo, ReactNode } from 'react'
interface Props {
diff --git a/src/components/react/SearchDialog.tsx b/src/components/react/SearchDialog.tsx
index 4c0d938..5a855ef 100644
--- a/src/components/react/SearchDialog.tsx
+++ b/src/components/react/SearchDialog.tsx
@@ -8,8 +8,6 @@ import {
Clock,
AlertCircle,
ChevronDown,
- X,
- Icon,
} from 'lucide-react'
import { Index } from 'flexsearch'
import {
@@ -67,7 +65,6 @@ const SEARCH_DEBOUNCE = 150
// Calculate relevance score
function calculateRelevanceScore(
result: SearchPostResult | SearchEventResult,
- query: string,
queryLower: string,
): number {
let score = 0
@@ -452,7 +449,7 @@ const SearchDialog: React.FC<SearchDialogProps> = ({ open, onOpenChange }) => {
// Calculate relevance scores and sort
const scoredResults = matchedResults.map((result) => ({
result,
- score: calculateRelevanceScore(result, searchQuery, normalizedQuery),
+ score: calculateRelevanceScore(result, normalizedQuery),
}))
// Sort by score (descending)