diff --git a/config-overrides.js b/config-overrides.js
index 2c5926aeb..6b9d5408d 100644
--- a/config-overrides.js
+++ b/config-overrides.js
@@ -1,4 +1,4 @@
-module.exports = function override(config, env) {
+module.exports = function override(config) {
config.module.rules.push({
test: /\.yml$/i,
loader: 'raw-loader',
diff --git a/src/components/NewFile/index.tsx b/src/components/NewFile/index.tsx
index dc1c9ea6e..7536751dd 100644
--- a/src/components/NewFile/index.tsx
+++ b/src/components/NewFile/index.tsx
@@ -1,22 +1,16 @@
+import React from 'react';
import examples from '../../examples';
-import state from '../../state';
-import {
- EditorService,
- SpecificationService
-} from '../../services';
+import { EditorService } from '../../services';
+import state from '../../state';
const NewFile = () => {
const handleTemplateClick = (template: string) => {
+ EditorService.updateState({ content: template, updateModel: true });
+
const panels = state.sidebar.panels;
- EditorService.updateState({ content: template });
- SpecificationService.parseSpec(template);
- panels.set({
- editor: true,
- navigation: true,
+ panels.merge({
newFile: false,
- view: true,
- viewType: 'template'
});
};
@@ -61,7 +55,7 @@ const NewFile = () => {
key={title}
className="text-left flex flex-col cursor-pointer rounded-lg p-4 pb-6 transform transition duration-200 border-2 border-gray-400 hover:scale-105 hover:border-pink-500 bg-gray-100"
>
- {title}
+ {title}
diff --git a/src/examples/index.tsx b/src/examples/index.tsx
index 93a2fad74..f60e2bf37 100644
--- a/src/examples/index.tsx
+++ b/src/examples/index.tsx
@@ -18,19 +18,19 @@ const templateTypes = {
export default [
{
title: 'Simple Example',
- description: () => <> A basic example of a service that is in charge of processing user signups. Great place to start learning AsyncAPI.>,
+ description: () => <>A basic example of a service that is in charge of processing user signups. Great place to start learning AsyncAPI.>,
template: simple,
type: templateTypes.protocol
},
{
title: 'Simple Hello World',
- description: () => <> A basic example of a service that is in charge of processing user signups. Great place to start learning AsyncAPI.>,
+ description: () => <>A basic example of a service that is in charge of processing user signups. Great place to start learning AsyncAPI.>,
template: simple,
type: templateTypes.protocol
},
{
title: 'Apache Kafka',
- description: () => <> A framework implementation of a software bus using stream-processing. Open Source developed by the Apache Software Foundation.>,
+ description: () => <>A framework implementation of a software bus using stream-processing. Open Source developed by the Apache Software Foundation.>,
template: kafka,
type: templateTypes.protocol
},