diff --git a/package.json b/package.json index c0fd229..e0f4609 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "// Lint": "-------------------------------------------------------------", "test": "npm run lint", - "lint": "eslint .", + "lint": "eslint . --fix", "format": "prettier --write '{public,src}/**/*.{css,html,js,svelte}'", "prepare": "husky install" }, @@ -22,7 +22,7 @@ "*.{js,jsx,ts,tsx}": [ "npm run lint", "npm run format", - "git add" + "git add ." ] }, "devDependencies": { diff --git a/src/lib/components/Docs.svelte b/src/lib/components/Docs.svelte index f35f6d8..aed566f 100644 --- a/src/lib/components/Docs.svelte +++ b/src/lib/components/Docs.svelte @@ -82,7 +82,7 @@ {#if selectedMethod}
{ return { id: index + 1, text: method }; }); - + export let answer = ""; - - if (typeof window !== 'undefined') { + + if (typeof window !== "undefined") { // Initialize from localStorage - answer = localStorage.getItem('rpcUrl') || ""; + answer = localStorage.getItem("rpcUrl") || ""; } - + let isVisible = false; $: { - if (!answer && typeof window !== 'undefined') { - answer = localStorage.getItem('rpcUrl') || ""; + if (!answer && typeof window !== "undefined") { + answer = localStorage.getItem("rpcUrl") || ""; } let rpcUrlValue = answer; - + if (!rpcUrlValue) { currentRPC.set("https://api.mainnet-beta.solana.com"); } @@ -32,8 +32,8 @@ } currentRPC.set(rpcUrlValue); - if (typeof window !== 'undefined') { - localStorage.setItem('rpcUrl', rpcUrlValue); // Save to localStorage + if (typeof window !== "undefined") { + localStorage.setItem("rpcUrl", rpcUrlValue); // Save to localStorage } } @@ -47,7 +47,7 @@ {#if isVisible}
diff --git a/src/lib/components/Request.svelte b/src/lib/components/Request.svelte index ba0858a..f6a096a 100644 --- a/src/lib/components/Request.svelte +++ b/src/lib/components/Request.svelte @@ -50,7 +50,7 @@ {#if selectedMethod}