From 638e2f9ed027da30a2b8bb76f7b516f5942fcfb2 Mon Sep 17 00:00:00 2001 From: mark8-1 Date: Fri, 22 Nov 2024 13:03:01 +0200 Subject: [PATCH] fix lint --- app/components/Button.tsx | 12 +-- app/components/Home.tsx | 2 +- app/components/Questionairefilter.tsx | 109 ++++++++++++++------------ app/components/WelcomeMessage.tsx | 33 ++++---- 4 files changed, 81 insertions(+), 75 deletions(-) diff --git a/app/components/Button.tsx b/app/components/Button.tsx index 26a5f79..98cac95 100644 --- a/app/components/Button.tsx +++ b/app/components/Button.tsx @@ -1,18 +1,18 @@ -import React from "react"; -import { Button as AntButton } from "antd"; +import React from "react" +import { Button as AntButton } from "antd" interface ToolMapButtonProps { - onClick: () => void; + onClick: () => void } const ToolMapButton: React.FC = ({ onClick }) => ( - Open Tool Finder -); +) -export default ToolMapButton; \ No newline at end of file +export default ToolMapButton diff --git a/app/components/Home.tsx b/app/components/Home.tsx index 1320035..00478d7 100644 --- a/app/components/Home.tsx +++ b/app/components/Home.tsx @@ -271,4 +271,4 @@ const EnAccessToolMap = () => { ) } -export default EnAccessToolMap \ No newline at end of file +export default EnAccessToolMap diff --git a/app/components/Questionairefilter.tsx b/app/components/Questionairefilter.tsx index 516cf00..18858fd 100644 --- a/app/components/Questionairefilter.tsx +++ b/app/components/Questionairefilter.tsx @@ -257,17 +257,17 @@ const tools = [ // Define an interface for the filters interface Filters { - numberOfClients: string[]; - transactionsPerDay: string[]; - companyStage: string[]; - companyFocus: string[]; - toolsCost: string[]; - toolSource: string[]; - internalExpertise: string[]; - businessArea: string[]; - functionalArea: string[]; - interoperability: string[]; - offlineFunctionality: string[]; + numberOfClients: string[] + transactionsPerDay: string[] + companyStage: string[] + companyFocus: string[] + toolsCost: string[] + toolSource: string[] + internalExpertise: string[] + businessArea: string[] + functionalArea: string[] + interoperability: string[] + offlineFunctionality: string[] } const EnAccessToolMap: React.FC = () => { @@ -300,7 +300,8 @@ const EnAccessToolMap: React.FC = () => { Object.entries(filters).every(([filterKey, selectedValues]) => { if (selectedValues.length === 0) return true - const metadataValue = tool.metadata[filterKey as keyof typeof tool.metadata] + const metadataValue = + tool.metadata[filterKey as keyof typeof tool.metadata] if (Array.isArray(metadataValue)) { return selectedValues.some((value: string) => @@ -339,50 +340,54 @@ const EnAccessToolMap: React.FC = () => { return (
-
- setSearchTerm(e.target.value)} - /> -
- -
-
- - {Object.keys(FILTER_OPTIONS).map((filterKey) => - renderFilterSection(filterKey as keyof Filters) - )} - +
+ setSearchTerm(e.target.value)} + />
-
- {!hasActiveFilters ? ( - - ) : filteredTools.length > 0 ? ( -
- {filteredTools.map((tool) => ( - - {tool.name} - {tool.summary} - - Visit Website - - - ))} -
- ) : ( - - )} +
+
+ + {Object.keys(FILTER_OPTIONS).map((filterKey) => + renderFilterSection(filterKey as keyof Filters) + )} + +
+ +
+ {!hasActiveFilters ? ( + + ) : filteredTools.length > 0 ? ( +
+ {filteredTools.map((tool) => ( + + + {tool.name} + + + {tool.summary} + + + Visit Website + + + ))} +
+ ) : ( + + )} +
-
) } diff --git a/app/components/WelcomeMessage.tsx b/app/components/WelcomeMessage.tsx index 5e03f62..ff338cc 100644 --- a/app/components/WelcomeMessage.tsx +++ b/app/components/WelcomeMessage.tsx @@ -1,28 +1,29 @@ -import React from "react"; -import { - Typography, - Empty, -} from "antd"; -import { Search } from "lucide-react"; +import React from "react" +import { Typography, Empty } from "antd" +import { Search } from "lucide-react" -const { Title, Paragraph } = Typography; +const { Title, Paragraph } = Typography interface WelcomeMessageProps { - hasFilters: boolean; + hasFilters: boolean } const WelcomeMessage: React.FC = ({ hasFilters }) => (
- Welcome to the Tool Finder + + Welcome to the Tool Finder + - {hasFilters - ? (
- -
) - : "Start by answering a few questions about your needs using the filters on the left. We'll help you find the perfect tools for your business."} + {hasFilters ? ( +
+ +
+ ) : ( + "Start by answering a few questions about your needs using the filters on the left. We'll help you find the perfect tools for your business." + )}
-); +) -export default WelcomeMessage; \ No newline at end of file +export default WelcomeMessage