1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "npm:react-dom@18.2.0/server";
3
4import { useState } from "react";
5import { Button, Card, Form } from "react-bootstrap";
6import { api } from "../api";
7
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
3import { parseProject } from "https://esm.town/v/std/utils/index.ts";
4import { html } from "https://esm.town/v/stevekrouse/html";
5import { renderToString } from "npm:react-dom@18.2.0/server";
6import config from "./config.json" with { type: "json" };
7import { SparklineSVG } from "./sparklineSVG";
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3 const padding = 2;
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { ToolCategory } from "../../shared/types";
4
8}
9
10const CategoryFilter: React.FC<CategoryFilterProps> = ({
11 selectedCategory,
12 onCategoryChange
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { AITool, ToolCategory } from "../../shared/types";
4
51};
52
53const ToolCard: React.FC<ToolCardProps> = ({ tool }) => {
54 return (
55 <div className="tool-card bg-white rounded-lg shadow-md overflow-hidden transition-all duration-300">
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3
4interface SearchBarProps {
6}
7
8const SearchBar: React.FC<SearchBarProps> = ({ onSearch }) => {
9 const [query, setQuery] = useState("");
10
11 const handleSubmit = (e: React.FormEvent) => {
12 e.preventDefault();
13 onSearch(query);
14 };
15
16 const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
17 setQuery(e.target.value);
18 };
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { AITool, SearchResult, ToolCategory } from "../../shared/types";
4import SearchBar from "./SearchBar";
13}
14
15const App: React.FC = () => {
16 const [tools, setTools] = useState<AITool[]>([]);
17 const [filteredTools, setFilteredTools] = useState<AITool[]>([]);
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import App from "./components/App";
5
12// Render the app
13root.render(
14 <React.StrictMode>
15 <App />
16 </React.StrictMode>
17);
44## Technology Stack
45
46- Frontend: React with Tailwind CSS
47- Backend: Hono API framework
48- AI: OpenAI for query understanding and tool recommendations
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useEffect, useRef } from "https://esm.sh/react@18.2.0";
3import { HotelWithDifferential } from "../../shared/types";
4