diff options
| author | Nolawz <Nolawz333@protonmail.com> | 2026-04-04 02:33:12 +0530 |
|---|---|---|
| committer | Nolawz <Nolawz333@protonmail.com> | 2026-04-04 02:33:12 +0530 |
| commit | 27cfe78592fca5458549f6c6c715c86248c3ab38 (patch) | |
| tree | f039e5dcd80f3fce997481c4d1cfdfdf663b7e56 | |
| parent | 5878b7cdcdd74b5936ba81d59e28fa154f82724b (diff) | |
Fixed some build errors and warnings
| -rw-r--r-- | src/components/FormField.astro | 2 | ||||
| -rw-r--r-- | src/components/react/ErrorBoundary.tsx | 2 | ||||
| -rw-r--r-- | src/components/react/SearchDialog.tsx | 5 | ||||
| -rw-r--r-- | src/pages/contribute.astro | 5 | ||||
| -rw-r--r-- | src/pages/forms/[...id].astro | 1 | ||||
| -rw-r--r-- | src/pages/members/[...id].astro | 2 |
6 files changed, 6 insertions, 11 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) diff --git a/src/pages/contribute.astro b/src/pages/contribute.astro index 552c235..3474996 100644 --- a/src/pages/contribute.astro +++ b/src/pages/contribute.astro @@ -6,11 +6,11 @@ import TOCSidebar from '@/components/TOCSidebar.astro' import Layout from '@/layouts/Layout.astro' import { Content, getHeadings } from './_contribute.mdx' -const headings = await getHeadings() +const headings = getHeadings() const sections = [ { - type: 'parent', + type: 'parent' as const, title: 'Contribution Guide', headings: headings, }, @@ -41,4 +41,3 @@ const sections = [ </article> </section> </Layout> - diff --git a/src/pages/forms/[...id].astro b/src/pages/forms/[...id].astro index 39a8ad2..de5bd70 100644 --- a/src/pages/forms/[...id].astro +++ b/src/pages/forms/[...id].astro @@ -83,7 +83,6 @@ const fields = Astro.props.data.form.fields if (!form) return const storageKey = `autosave-form-${form.dataset.formId}` - let saveTimeout: ReturnType<typeof setTimeout> // load saved data on mount const savedData = JSON.parse(localStorage.getItem(storageKey) || '{}') diff --git a/src/pages/members/[...id].astro b/src/pages/members/[...id].astro index 3bf4e3c..6ceb3f6 100644 --- a/src/pages/members/[...id].astro +++ b/src/pages/members/[...id].astro @@ -17,7 +17,7 @@ export async function getStaticPaths() { const { member } = Astro.props const memberPosts = await getPostsByAuthor(member.id) -const { Content, headings } = await render(member) +const { Content } = await render(member) --- <Layout class="max-w-3xl"> |
