1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

chore: code fixes

This commit is contained in:
2022-07-26 00:07:11 +05:00
parent 6c7550286b
commit ce2114e3f6
2 changed files with 7 additions and 8 deletions

View File

@@ -98,8 +98,6 @@ const TreeViewNode = ({
return
}
if (!node.name.includes('.')) return
handleSelect(node.relativePath)
}

View File

@@ -138,6 +138,11 @@ const SASjsEditor = ({
}
}, [selectedFilePath])
useEffect(() => {
if (runTimes.includes(selectedFileExtension))
setSelectedRunTime(selectedFileExtension)
}, [selectedFileExtension, runTimes])
const handleTabChange = (_e: any, newValue: string) => {
setTab(newValue)
}
@@ -587,15 +592,11 @@ const FileMenu = ({
}
const getLanguage = (extension: string) => {
if (extension === 'sas') return 'sas'
if (extension === 'js') return 'javascript'
if (extension === 'ts') return 'typescript'
if (extension === 'html') return 'html'
if (extension === 'md' || extension === 'mdx') return 'markdown'
if (extension === 'css') return 'css'
return ''
return extension
}