diff --git a/e2e/accessibility.test.ts b/e2e/accessibility.test.ts index eb71385..a0023fa 100644 --- a/e2e/accessibility.test.ts +++ b/e2e/accessibility.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from "@playwright/test"; import { AxeBuilder } from "@axe-core/playwright"; +import { expect, test } from "@playwright/test"; test("should not have any automatically detectable accessibility issues on landing page", async ({ page, diff --git a/src/components/Budget/BudgetPage.tsx b/src/components/Budget/BudgetPage.tsx index 561056b..cca0cb8 100644 --- a/src/components/Budget/BudgetPage.tsx +++ b/src/components/Budget/BudgetPage.tsx @@ -1,4 +1,4 @@ -import { lazy, Suspense, useEffect, useState } from "react"; +import { Suspense, lazy, useEffect, useState } from "react"; import { Col, Container, Row, ToastContainer } from "react-bootstrap"; import { useHotkeys } from "react-hotkeys-hook"; import { useParams } from "react-router-dom"; @@ -79,8 +79,8 @@ export function BudgetPage() { // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { try { - const shouldLoadBudgetsFromList = budgetList && budgetList.length >= 1 && - Array.isArray(budgetList); + const shouldLoadBudgetsFromList = + budgetList && budgetList.length >= 1 && Array.isArray(budgetList); if (shouldLoadBudgetsFromList) { if (name.trim() !== "undefined") { @@ -138,8 +138,7 @@ export function BudgetPage() {
- setShowGraphs(true)} + onShowGraphs={() => setShowGraphs(true)} />
diff --git a/src/components/NavBar/NavBar.tsx b/src/components/NavBar/NavBar.tsx index 71c5fc8..c171db9 100644 --- a/src/components/NavBar/NavBar.tsx +++ b/src/components/NavBar/NavBar.tsx @@ -39,9 +39,8 @@ export interface SearchOption { export function NavBar() { const searchRef = useRef(null); - const nameRef = useRef() as React.MutableRefObject< - HTMLInputElement - >; + const nameRef = + useRef() as React.MutableRefObject; const deleteButtonRef = useRef(null); const [expanded, setExpanded] = useState(false); @@ -98,9 +97,8 @@ export function NavBar() { setTheme("dark"); } - mediaQueryList.addEventListener( - "change", - (event) => setTheme(event.matches ? "dark" : "light"), + mediaQueryList.addEventListener("change", (event) => + setTheme(event.matches ? "dark" : "light"), ); }, []); @@ -240,9 +238,7 @@ export function NavBar() { placement="end" show={expanded} > - + {budget?.name ?? "guitos"} @@ -289,11 +285,13 @@ export function NavBar() { buttonAriaLabel={"undo change"} buttonClassName="w-100" buttonVariant={"outline-info"} - buttonIcon={expanded - ? ( + buttonIcon={ + expanded ? ( "undo" + ) : ( + ) - : } + } /> } + buttonIcon={ + expanded ? "redo" : + } /> )} @@ -360,9 +358,9 @@ export function NavBar() { buttonClassName="w-100" buttonVariant={"outline-info"} buttonLink="https://github.com/rare-magma/guitos#getting-started" - buttonIcon={expanded - ? "instructions" - : } + buttonIcon={ + expanded ? "instructions" : + } target="_blank" /> diff --git a/src/components/StatCard/StatCard.tsx b/src/components/StatCard/StatCard.tsx index 0022dc6..99fe2da 100644 --- a/src/components/StatCard/StatCard.tsx +++ b/src/components/StatCard/StatCard.tsx @@ -43,15 +43,13 @@ export function StatCard({ onShowGraphs }: StatCardProps) { const stat = budget?.stats; const [autoGoal, setAutoGoal] = useState(false); - const shouldCalculateAvailablePerc = revenuePercentage <= 100 && stat && - stat.available > 0; + const shouldCalculateAvailablePerc = + revenuePercentage <= 100 && stat && stat.available > 0; - const goalRef = useRef() as React.MutableRefObject< - HTMLInputElement - >; - const reservesRef = useRef() as React.MutableRefObject< - HTMLInputElement - >; + const goalRef = + useRef() as React.MutableRefObject; + const reservesRef = + useRef() as React.MutableRefObject; useHotkeys("g", (e) => !e.repeat && focusRef(goalRef), { preventDefault: true,