Skip to content

Commit 9bc2223

Browse files
committed
the webstie now load data from json not excel reason excel is slow
1 parent ffa3f5a commit 9bc2223

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

convertExcelToJson.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const convertExcelToJson = () => {
3535
});
3636

3737
// Write the JSON data to a file
38-
fs.writeFileSync('tools.json', JSON.stringify(Object.values(categoriesMap), null, 2));
38+
fs.writeFileSync('./public/tools.json', JSON.stringify(Object.values(categoriesMap), null, 2));
3939

4040
console.log("Excel file has been converted to JSON.");
4141
};

src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function ScriptGenerator() {
3838
useEffect(() => {
3939
const fetchAndParse = async () => {
4040
try {
41-
const res = await fetch("/tools.json"); // Assuming the JSON file is hosted at /tools.json
41+
const res = await fetch("./tools.json");
4242
if (!res.ok) {
4343
throw new Error('Failed to fetch JSON file');
4444
}

0 commit comments

Comments
 (0)