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:
@@ -98,8 +98,6 @@ const TreeViewNode = ({
|
||||
return
|
||||
}
|
||||
|
||||
if (!node.name.includes('.')) return
|
||||
|
||||
handleSelect(node.relativePath)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user