Skip to content

Commit

Permalink
chore: Run check
Browse files Browse the repository at this point in the history
  • Loading branch information
daavidrgz committed Dec 24, 2024
1 parent 04f7f26 commit e848271
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
9 changes: 6 additions & 3 deletions crates/web/frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { useSearchParams } from "next/navigation";
import { type MutableRefObject, Suspense, useCallback, useEffect, useRef, useState } from "react";
import type PromiseWorker from "webworker-promise";
import { applyGq, applyTemplate, getQueryCompletionSource, importShare } from "./page-utils";
import { set } from "zod";

const ShareLoader = ({
updateInputEditorCallback,
Expand Down Expand Up @@ -100,7 +99,6 @@ const Home = () => {
const debounce = useDebounce();
const { gqWorker, lspWorker } = useWorker();


const updateTemplateOutput = useCallback(
async (inputContent: string, inputType: FileType, jinjaContent: string, silent = true) => {
if (!gqWorker || isApplying) return;
Expand All @@ -125,7 +123,12 @@ const Home = () => {
(content: string) => {
autoApply &&
debounce(debounceTime, () =>
updateTemplateOutput(outputContent.current, outputType.current, content, debounceTime < 500),
updateTemplateOutput(
outputContent.current,
outputType.current,
content,
debounceTime < 500,
),
);
},
[autoApply, debounce, updateTemplateOutput, debounceTime],
Expand Down
4 changes: 2 additions & 2 deletions crates/web/frontend/src/components/dump-block/dump-block.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { notify } from "@/lib/notify";
import { cn } from "@/lib/utils";
import ActionButton from "../action-button/action-button";
import { Redo, Trash } from "lucide-react";
import { notify } from "@/lib/notify";
import ActionButton from "../action-button/action-button";

interface Props extends React.HTMLAttributes<HTMLDivElement> {
onDump: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ import {
getPaginatedTemplates,
} from "@/services/history/history-service";
import { TabsContent } from "@radix-ui/react-tabs";
import { AnimatePresence, motion } from "framer-motion";
import { Code, Redo, Search, SquareDashed, Trash, X } from "lucide-react";
import { AnimatePresence } from "framer-motion";
import { Code, Search, SquareDashed, X } from "lucide-react";
import { type MutableRefObject, useCallback, useEffect, useState } from "react";
import ActionButton from "../action-button/action-button";
import { DumpBlock } from "../dump-block/dump-block";
import SimpleEditor from "../editor/simple-editor";
import { Button } from "../ui/button";
import { Input } from "../ui/input";
import { SidebarContent, SidebarDescription, SidebarHeader, SidebarTitle } from "../ui/sidebar";
import { Tabs, TabsList, TabsTrigger } from "../ui/tabs";
import { groupItems } from "./history-tab-utils";
import { DumpBlock } from "../dump-block/dump-block";

interface HistoryTabContentProps {
value: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import ExamplesTab from "../examples-tab/examples-tab";
import HistoryTab from "../history-tab/history-tab";
import SettingsTab from "../settings-tab/settings-tab";
import ShareTab from "../share-tab/share-tab";
import ThemeButton from "../theme-button/theme-button";
import { TemplatesTab } from "../templates-tab/templates-tab";
import ThemeButton from "../theme-button/theme-button";

type Tab = "examples" | "share" | "history" | "templates" | "settings";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { gqTheme, gqThemeInit } from "@/lib/theme";
import { SidebarContent, SidebarDescription, SidebarHeader, SidebarTitle } from "../ui/sidebar";
import { templates } from "./templates";
import { gqThemeInit } from "@/lib/theme";
import { countLines } from "@/lib/utils";
import FileType from "@/model/file-type";
import CodeMirror, { type Extension } from "@uiw/react-codemirror";
import { Dot, Info } from "lucide-react";
import { useMemo } from "react";
import { getCodemirrorExtensionsByFileType } from "../editor/editor-utils";
import FileType from "@/model/file-type";
import { CircleDot, Dot, Info } from "lucide-react";
import { DumpBlock } from "../dump-block/dump-block";
import { countLines } from "@/lib/utils";
import { getCodemirrorExtensionsByFileType } from "../editor/editor-utils";
import { SidebarContent, SidebarDescription, SidebarHeader, SidebarTitle } from "../ui/sidebar";
import { templates } from "./templates";

interface Props {
onClickTemplate: (templateContent: string) => void;
Expand Down
8 changes: 2 additions & 6 deletions crates/web/frontend/src/services/history/history-service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import {
MAX_HISTORY_QUERY_SIZE,
MAX_QUERY_HISTORY_SIZE,
MAX_TEMPLATE_HISTORY_SIZE,
} from "@/lib/constants";
import { HistoryItem } from "@/model/history-item";
import { MAX_QUERY_HISTORY_SIZE, MAX_TEMPLATE_HISTORY_SIZE } from "@/lib/constants";
import type { HistoryItem } from "@/model/history-item";
import { type IDBPDatabase, deleteDB, openDB } from "idb";

const DB_NAME = "gq";
Expand Down

0 comments on commit e848271

Please sign in to comment.