Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
attempting to solve homepage resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
mapachurro committed Jul 22, 2024
1 parent 8bcf936 commit 37b82a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Education DAO Glossary</title>
<base href="/web3-glossary-website/" /> <!-- Ensure this base URL is correctly set -->
<base href="/web3-glossary-website/" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script> <!-- Adjusted path to be relative -->
<script type="module" src="./src/index.jsx"></script>
</body>
</html>
17 changes: 1 addition & 16 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function App() {

useEffect(() => {
if (searchResults.length > 0) {
const query = searchResults[0].term; // Reuse the last search query
const query = searchResults[0].term;
handleSearch(query);
}
}, [i18n.language]);
Expand All @@ -49,21 +49,6 @@ function App() {
<Route path="/" element={<Home onSearch={handleSearch} />} />
<Route path="/term/:termKey" element={<EntryPage onNewSearch={handleNewSearch} />} />
</Routes>
{searchResults.length > 0 && (
<ul>
{searchResults.map((result) => (
<li
key={result.term}
onClick={() => navigate(`/term/${encodeURIComponent(result.term)}`)}
style={{
cursor: allTerms.includes(result.term) ? 'pointer' : 'default',
}}
>
{result.term}
</li>
))}
</ul>
)}
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react';
import path from 'path';

export default defineConfig({
base: '/web3-glossary-website/', // Ensure this is set to your repository name
base: '/web3-glossary-website/',
plugins: [react()],
resolve: {
alias: {
Expand Down

0 comments on commit 37b82a9

Please sign in to comment.