From 8bcf9366b0668a2a09d839b4d0be6cdae3ae92a2 Mon Sep 17 00:00:00 2001 From: mapachurro Date: Mon, 22 Jul 2024 13:27:31 -0400 Subject: [PATCH] hopefully correct and working --- index.html | 4 ++-- src/App.jsx | 16 +++++++++++++++- vite.config.js | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 4eb79d1..16dcb00 100644 --- a/index.html +++ b/index.html @@ -4,10 +4,10 @@ Education DAO Glossary - +
- + diff --git a/src/App.jsx b/src/App.jsx index 799e238..2f4689c 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,6 +1,5 @@ import React, { useState, useEffect } from 'react'; import { Routes, Route, useNavigate } from 'react-router-dom'; -import Search from './components/Search'; import index from './searchIndex'; import terms from './terms.json'; import EntryPage from './EntryPage'; @@ -50,6 +49,21 @@ function App() { } /> } /> + {searchResults.length > 0 && ( +
    + {searchResults.map((result) => ( +
  • navigate(`/term/${encodeURIComponent(result.term)}`)} + style={{ + cursor: allTerms.includes(result.term) ? 'pointer' : 'default', + }} + > + {result.term} +
  • + ))} +
+ )} ); } diff --git a/vite.config.js b/vite.config.js index 4bbb0fd..d5c6b59 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react'; import path from 'path'; export default defineConfig({ - base: '/web3-glossary-website/', // Set this to your repository name + base: '/web3-glossary-website/', // Ensure this is set to your repository name plugins: [react()], resolve: { alias: {