mirror of
https://github.com/khairul169/code-share.git
synced 2025-04-28 16:49:36 +07:00
merge remote
This commit is contained in:
parent
7703eea760
commit
064f89af68
@ -33,7 +33,8 @@ const CodeEditor = (props: Props) => {
|
||||
|
||||
monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
|
||||
target: monaco.languages.typescript.ScriptTarget.Latest,
|
||||
allowNonTsExtensions: true,
|
||||
allowNonTsExtensions: false,
|
||||
allowImportingTsExtensions: true,
|
||||
moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
|
||||
module: monaco.languages.typescript.ModuleKind.CommonJS,
|
||||
noEmit: true,
|
||||
|
@ -40,15 +40,13 @@ const FileViewer = ({ id }: Props) => {
|
||||
return <p>File not found.</p>;
|
||||
}
|
||||
|
||||
const { filename } = data;
|
||||
|
||||
if (!data.isFile) {
|
||||
return (
|
||||
<Suspense fallback={<LoadingLayout />}>
|
||||
<CodeEditor
|
||||
filename={filename}
|
||||
filename={data.filename}
|
||||
path={data.path}
|
||||
value={data?.content || ""}
|
||||
value={data.content || ""}
|
||||
formatOnSave
|
||||
onChange={(val) => {
|
||||
updateFileContent.mutate({
|
||||
|
Loading…
x
Reference in New Issue
Block a user