diff --git a/apps/studio/src/services/app.service.ts b/apps/studio/src/services/app.service.ts index 428fef896..bc2dbd8b2 100644 --- a/apps/studio/src/services/app.service.ts +++ b/apps/studio/src/services/app.service.ts @@ -1,10 +1,10 @@ -import { AbstractService } from "./abstract.service"; +import { AbstractService } from './abstract.service'; -import { show } from "@ebay/nice-modal-react"; +import { show } from '@ebay/nice-modal-react'; -import { RedirectedModal } from "../components/Modals"; +import { RedirectedModal } from '../components/Modals'; -import { appState, filesState } from "../state"; +import { appState, filesState } from '../state'; export class ApplicationService extends AbstractService { override async onInit() { @@ -53,7 +53,7 @@ export class ApplicationService extends AbstractService { } const { updateFile } = filesState.getState(); - let content = ""; + let content = ''; if (url) { content = await fetch(url).then((res) => res.text()); } else if (base64) { @@ -62,21 +62,21 @@ export class ApplicationService extends AbstractService { const language = this.svcs.formatSvc.retrieveLangauge(content); const source = url || undefined; - updateFile("asyncapi", { + updateFile('asyncapi', { content, language, source, - from: url ? "url" : "base64", + from: url ? 'url' : 'base64', }); - await this.svcs.parserSvc.parse("asyncapi", content, { source }); + await this.svcs.parserSvc.parse('asyncapi', content, { source }); } private hidePreloader() { const unsunscribe = appState.subscribe((state, prevState) => { if (!prevState.initialized && state.initialized) { - const preloader = document.getElementById("preloader"); + const preloader = document.getElementById('preloader'); if (preloader) { - preloader.classList.add("loaded"); + preloader.classList.add('loaded'); setTimeout(() => { preloader.remove(); }, 350); diff --git a/apps/studio/src/studio.tsx b/apps/studio/src/studio.tsx index 172dd0e02..ba60207fc 100644 --- a/apps/studio/src/studio.tsx +++ b/apps/studio/src/studio.tsx @@ -1,10 +1,10 @@ -import React, { useEffect } from "react"; -import toast, { Toaster } from "react-hot-toast"; +import React, { useEffect } from 'react'; +import toast, { Toaster } from 'react-hot-toast'; -import { Content, Sidebar, Template, Toolbar } from "./components"; +import { Content, Sidebar, Template, Toolbar } from './components'; -import { afterAppInit, useServices } from "./services"; -import { appState } from "./state"; +import { afterAppInit, useServices } from './services'; +import { appState } from './state'; export interface AsyncAPIStudioProps {}