mirror of
https://github.com/sasjs/server.git
synced 2026-01-05 05:40:06 +00:00
chore: code fixes
This commit is contained in:
@@ -98,8 +98,6 @@ const TreeViewNode = ({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!node.name.includes('.')) return
|
|
||||||
|
|
||||||
handleSelect(node.relativePath)
|
handleSelect(node.relativePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,6 +138,11 @@ const SASjsEditor = ({
|
|||||||
}
|
}
|
||||||
}, [selectedFilePath])
|
}, [selectedFilePath])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (runTimes.includes(selectedFileExtension))
|
||||||
|
setSelectedRunTime(selectedFileExtension)
|
||||||
|
}, [selectedFileExtension, runTimes])
|
||||||
|
|
||||||
const handleTabChange = (_e: any, newValue: string) => {
|
const handleTabChange = (_e: any, newValue: string) => {
|
||||||
setTab(newValue)
|
setTab(newValue)
|
||||||
}
|
}
|
||||||
@@ -587,15 +592,11 @@ const FileMenu = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getLanguage = (extension: string) => {
|
const getLanguage = (extension: string) => {
|
||||||
if (extension === 'sas') return 'sas'
|
|
||||||
|
|
||||||
if (extension === 'js') return 'javascript'
|
if (extension === 'js') return 'javascript'
|
||||||
|
|
||||||
if (extension === 'ts') return 'typescript'
|
if (extension === 'ts') return 'typescript'
|
||||||
|
|
||||||
if (extension === 'html') return 'html'
|
if (extension === 'md' || extension === 'mdx') return 'markdown'
|
||||||
|
|
||||||
if (extension === 'css') return 'css'
|
return extension
|
||||||
|
|
||||||
return ''
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user