biome check+format

This commit is contained in:
2026-01-25 10:03:02 +00:00
parent 13ef090e7b
commit 0666321da5
11 changed files with 47 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
import { BrowserRouter, Route, Routes } from "react-router-dom";
import Index from "@/Index"; import Index from "@/Index";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import Settings from "./Settings"; import Settings from "./Settings";
function App() { function App() {

View File

@@ -1,7 +1,7 @@
import ThemeToggle from "@/components/theme-toggle"; import ThemeToggle from "@/components/theme-toggle";
import { Link, useLocation } from "react-router-dom";
import { Home, Settings } from "lucide-react";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Home, Settings } from "lucide-react";
import { Link, useLocation } from "react-router-dom";
export default function Layout({ export default function Layout({
children, children,

View File

@@ -1,7 +1,7 @@
import { Stage, Layer } from "react-konva";
import { useEffect, useState } from "react";
import MorphableShape from "./MorphableShape";
import type { ShapeState } from "@/types/shape"; import type { ShapeState } from "@/types/shape";
import { useEffect, useState } from "react";
import { Layer, Stage } from "react-konva";
import MorphableShape from "./MorphableShape";
export default function ShapeCanvas({ export default function ShapeCanvas({
state, state,

View File

@@ -1,7 +1,7 @@
import { Moon, Sun } from "lucide-react";
import { useEffect, useState } from "react";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { Moon, Sun } from "lucide-react";
import { useEffect, useState } from "react";
function ThemeToggle({ className }: { className?: string }) { function ThemeToggle({ className }: { className?: string }) {
const [theme, setTheme] = useState<string | null>(); const [theme, setTheme] = useState<string | null>();

View File

@@ -1,6 +1,6 @@
import type * as React from "react";
import { Slot } from "@radix-ui/react-slot"; import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority"; import { type VariantProps, cva } from "class-variance-authority";
import type * as React from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import * as SliderPrimitive from "@radix-ui/react-slider"; import * as SliderPrimitive from "@radix-ui/react-slider";
import * as React from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";

View File

@@ -1,8 +1,8 @@
"use client"; "use client";
import type * as React from "react";
import * as TogglePrimitive from "@radix-ui/react-toggle"; import * as TogglePrimitive from "@radix-ui/react-toggle";
import { cva, type VariantProps } from "class-variance-authority"; import { type VariantProps, cva } from "class-variance-authority";
import type * as React from "react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";

View File

@@ -39,17 +39,17 @@ export function useShapeState(centerX: number, centerY: number) {
}, [centerX, centerY]); }, [centerX, centerY]);
// beforeunload warning // beforeunload warning
useEffect(() => { // useEffect(() => {
const handleBeforeUnload = (e: BeforeUnloadEvent) => { // const handleBeforeUnload = (e: BeforeUnloadEvent) => {
const hasChanged = JSON.stringify(state) !== JSON.stringify(initialStateRef.current); // const hasChanged = JSON.stringify(state) !== JSON.stringify(initialStateRef.current);
if (hasChanged) { // if (hasChanged) {
e.preventDefault(); // e.preventDefault();
} // }
}; // };
window.addEventListener("beforeunload", handleBeforeUnload); // window.addEventListener("beforeunload", handleBeforeUnload);
return () => window.removeEventListener("beforeunload", handleBeforeUnload); // return () => window.removeEventListener("beforeunload", handleBeforeUnload);
}, [state]); // }, [state]);
return [state, setState] as const; return [state, setState] as const;
} }

View File

@@ -1,6 +1,6 @@
import { clsx, type ClassValue } from "clsx" import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge" import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) { export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs)) return twMerge(clsx(inputs));
} }

View File

@@ -1,7 +1,7 @@
import "./App.css"; import "./App.css";
import App from "@/App";
import React from "react"; import React from "react";
import ReactDOM from "react-dom/client"; import ReactDOM from "react-dom/client";
import App from "@/App";
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode> <React.StrictMode>