22import moment from 'moment'
33import electron from 'electron'
44import * as electronFs from "fs"
5- import * as electronOs from "os"
65import { toast } from 'react-toastify'
7- import isDev from 'electron-is-dev' ;
86import { useNavigate } from 'react-router-dom'
9- import React , { useEffect , useMemo , useState } from 'react'
7+ import React , { useMemo , useState } from 'react'
108
119import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
1210import { faCogs , faDatabase , faFileCode , faFloppyDisk , faFolder , faTrash } from '@fortawesome/free-solid-svg-icons'
@@ -15,12 +13,12 @@ import { useWorkbenchDB } from '../../contexts/workbenchContext'
1513import CoreButton from '../../components/CoreButton/CoreButton' ;
1614import ProgressLoader from '../../components/ProgressLoader/ProgressLoader'
1715
16+ import { ROUTES } from '../../constants/routes'
1817import { GetHistory , HistoryItem , RemoveEntry } from '../../services/historyStore'
1918
2019import { OPEN_DIALOG_CHANNEL } from '../../constants/IpcConnection' ;
2120
2221import './home.css'
23- import { DEFAULT_ROUTE_ON_IMPORT , ROUTES } from '../../constants/routes'
2422
2523const { ipcRenderer } = electron ;
2624
@@ -100,14 +98,6 @@ const Home = () => {
10098 // Copy already created/imported sqlite file to new sqlite file, and
10199 // update path of workbench DB to new sqlite DB
102100 const saveSqliteFile = ( ) => ipcRenderer . send ( OPEN_DIALOG_CHANNEL . SAVE_SQLITE ) ;
103-
104- // Will cause inaccessible Home page, set AUTO_IMPORT_IN_DEV to false
105- useEffect ( ( ) => {
106- if ( isDev && DEV_CONFIG . AUTO_IMPORT_IN_DEV && history [ 0 ] ) {
107- historyItemParser ( history [ 0 ] ) ;
108- setTimeout ( ( ) => navigate ( DEV_CONFIG . GO_TO_ROUTE_ON_IMPORT ) , 200 ) ;
109- }
110- } , [ ] ) ;
111101
112102
113103 if ( ! initialized && loadingStatus !== null ) {
0 commit comments