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