Fix ESLint warnings for deployment
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { Home, Hash, FileText, FileSpreadsheet, Wand2, GitCompare, Menu, X, Database, LinkIcon, Code2, ChevronDown, Type, Edit3 } from 'lucide-react';
|
||||
import { Home, Hash, FileSpreadsheet, Wand2, GitCompare, Menu, X, LinkIcon, Code2, ChevronDown, Type, Edit3 } from 'lucide-react';
|
||||
import ThemeToggle from './ThemeToggle';
|
||||
import ToolSidebar from './ToolSidebar';
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import React, { useMemo, useCallback } from 'react';
|
||||
import ReactFlow, {
|
||||
Node,
|
||||
Edge,
|
||||
Controls,
|
||||
MiniMap,
|
||||
Background,
|
||||
@@ -20,7 +18,6 @@ import {
|
||||
Type,
|
||||
Hash,
|
||||
ToggleLeft,
|
||||
Calendar,
|
||||
FileText,
|
||||
Zap,
|
||||
Copy,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { Search, FileText, Database, LinkIcon, Hash, FileSpreadsheet, Wand2, GitCompare, Home, ChevronLeft, ChevronRight, Type, Edit3 } from 'lucide-react';
|
||||
import { Search, LinkIcon, Hash, FileSpreadsheet, Wand2, GitCompare, Home, ChevronLeft, ChevronRight, Type, Edit3 } from 'lucide-react';
|
||||
|
||||
const ToolSidebar = () => {
|
||||
const location = useLocation();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Search, Code, Link2, FileText, Hash, RefreshCw, GitCompare, Database, Type, Edit3 } from 'lucide-react';
|
||||
import { Search, Code, Link2, FileText, Hash, RefreshCw, GitCompare, Type, Edit3 } from 'lucide-react';
|
||||
import ToolCard from '../components/ToolCard';
|
||||
|
||||
const Home = () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState, useRef } from 'react';
|
||||
import { Edit3, Upload, FileText, Download, Copy, Map } from 'lucide-react';
|
||||
import React, { useState, useRef, useCallback } from 'react';
|
||||
import { Edit3, Upload, FileText, Map } from 'lucide-react';
|
||||
import ToolLayout from '../components/ToolLayout';
|
||||
import CopyButton from '../components/CopyButton';
|
||||
import StructuredEditor from '../components/StructuredEditor';
|
||||
@@ -258,7 +258,7 @@ const ObjectEditor = () => {
|
||||
};
|
||||
|
||||
// Generate all output formats
|
||||
const generateOutputs = (data) => {
|
||||
const generateOutputs = useCallback((data) => {
|
||||
try {
|
||||
const jsonPretty = JSON.stringify(data, null, 2);
|
||||
const jsonMinified = JSON.stringify(data);
|
||||
@@ -272,7 +272,7 @@ const ObjectEditor = () => {
|
||||
} catch (err) {
|
||||
console.error('Error generating outputs:', err);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Handle file import
|
||||
const handleFileImport = (event) => {
|
||||
@@ -314,7 +314,7 @@ const ObjectEditor = () => {
|
||||
// Initialize outputs when component mounts or data changes
|
||||
React.useEffect(() => {
|
||||
generateOutputs(structuredData);
|
||||
}, [structuredData]);
|
||||
}, [structuredData, generateOutputs]);
|
||||
|
||||
return (
|
||||
<ToolLayout
|
||||
|
||||
Reference in New Issue
Block a user