mirror of
				https://github.com/chartdb/chartdb.git
				synced 2025-11-04 14:03:15 +00:00 
			
		
		
		
	lib refactor (#744)
This commit is contained in:
		@@ -36,6 +36,7 @@ import { useDebounce } from '@/hooks/use-debounce-v2';
 | 
			
		||||
import { InstructionsSection } from './instructions-section/instructions-section';
 | 
			
		||||
import { parseSQLError } from '@/lib/data/sql-import';
 | 
			
		||||
import type { editor } from 'monaco-editor';
 | 
			
		||||
import { waitFor } from '@/lib/utils';
 | 
			
		||||
 | 
			
		||||
const errorScriptOutputMessage =
 | 
			
		||||
    'Invalid JSON. Please correct it or contact us at support@chartdb.io for help.';
 | 
			
		||||
@@ -211,7 +212,8 @@ export const ImportDatabase: React.FC<ImportDatabaseProps> = ({
 | 
			
		||||
    const handleCheckJson = useCallback(async () => {
 | 
			
		||||
        setIsCheckingJson(true);
 | 
			
		||||
 | 
			
		||||
        const fixedJson = await fixMetadataJson(scriptResult);
 | 
			
		||||
        await waitFor(1000);
 | 
			
		||||
        const fixedJson = fixMetadataJson(scriptResult);
 | 
			
		||||
 | 
			
		||||
        if (isStringMetadataJson(fixedJson)) {
 | 
			
		||||
            setScriptResult(fixedJson);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user