From 0bd27b874d5f4801fa055860fe0992ff3d539450 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 9 Mar 2025 15:48:50 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../scratchpad/scratchpad-storage.ts | 20 ++++++++----------- .../src/components/scratchpad/scratchpad.tsx | 6 +++--- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/scratchpad/scratchpad-storage.ts b/frontend/src/components/scratchpad/scratchpad-storage.ts index 9af7af7e103..8746bec7334 100644 --- a/frontend/src/components/scratchpad/scratchpad-storage.ts +++ b/frontend/src/components/scratchpad/scratchpad-storage.ts @@ -10,7 +10,9 @@ import { ZodLocalStorage } from "@/utils/localStorage"; */ export const getStorageKey = (): string => { const filename = getFilenameFromDOM(); - return filename ? `marimo:scratchpad:${filename}` : "marimo:scratchpad:default"; + return filename + ? `marimo:scratchpad:${filename}` + : "marimo:scratchpad:default"; }; // Schema for the scratchpad code @@ -22,24 +24,18 @@ const scratchpadCodeSchema = z.string().default(""); export const scratchpadStorage = new ZodLocalStorage( getStorageKey(), scratchpadCodeSchema, - () => "" + () => "", ); /** * Atom for the scratchpad code * Using atomWithStorage to persist the code in localStorage */ -export const scratchpadCodeAtom = atomWithStorage( - getStorageKey(), - "" -); +export const scratchpadCodeAtom = atomWithStorage(getStorageKey(), ""); /** * Action to update the scratchpad code in localStorage */ -export const updateScratchpadCodeAtom = atom( - null, - (get, set, code: string) => { - set(scratchpadCodeAtom, code); - } -); +export const updateScratchpadCodeAtom = atom(null, (get, set, code: string) => { + set(scratchpadCodeAtom, code); +}); diff --git a/frontend/src/components/scratchpad/scratchpad.tsx b/frontend/src/components/scratchpad/scratchpad.tsx index e595ed26325..efc78622145 100644 --- a/frontend/src/components/scratchpad/scratchpad.tsx +++ b/frontend/src/components/scratchpad/scratchpad.tsx @@ -35,9 +35,9 @@ import { scratchpadHistoryAtom, historyVisibleAtom, } from "./scratchpad-history"; -import { - scratchpadCodeAtom, - updateScratchpadCodeAtom +import { + scratchpadCodeAtom, + updateScratchpadCodeAtom, } from "./scratchpad-storage"; import { cn } from "@/utils/cn"; import type { CellConfig } from "@/core/network/types";