diff --git a/cypress.config.ts b/cypress.config.ts index 9214579..07371bd 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from "cypress"; export default defineConfig({ e2e: { baseUrl: "http://localhost:5173", - setupNodeEvents(on, config) { + setupNodeEvents(_on, _config) { // implement node event listeners here }, }, diff --git a/src/App.test.tsx b/src/App.test.tsx index 01a9594..6a0334b 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -1,5 +1,4 @@ import { render } from "@testing-library/react"; -import React from "react"; import App from "./App"; test("renders without crashing", () => { diff --git a/src/App.tsx b/src/App.tsx index 8af1032..7951ea9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -37,17 +37,15 @@ import "@ionic/react/css/palettes/dark.system.css"; /* Theme variables */ import "./theme/variables.css"; +import { AuthProvider, useAuth } from "./hooks/useAuth"; /* Pages */ import Friends from "./pages/friends/Friends"; +import Login from "./pages/login/Login"; import Me from "./pages/me/Me"; import Settings from "./pages/settings/Settings"; import Stats from "./pages/stats/Stats"; import Workout from "./pages/workout/Workout"; -import { AuthProvider, useAuth } from "./hooks/useAuth"; -import Login from "./pages/login/Login"; -import { useEffect } from "react"; - setupIonicReact(); function AuthenticatedRouter() { @@ -114,10 +112,6 @@ function UnauthenticatedRouter() { function AppContent() { const { isAuthenticated, isLoading } = useAuth(); - useEffect(() => { - console.log("isAuthenticated", isAuthenticated); - }, [isAuthenticated]); - return ( diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx index e4e53a3..a641b61 100644 --- a/src/hooks/useAuth.tsx +++ b/src/hooks/useAuth.tsx @@ -1,10 +1,10 @@ import { createContext, + type ReactNode, useCallback, useContext, useEffect, useState, - type ReactNode, } from "react"; import { clearTokens, diff --git a/src/main.tsx b/src/main.tsx index eaaef10..562b585 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -3,6 +3,7 @@ import { createRoot } from "react-dom/client"; import App from "./App"; const container = document.getElementById("root"); +// biome-ignore lint/style/noNonNullAssertion: boilerplate const root = createRoot(container!); root.render( diff --git a/src/pages/login/Login.css b/src/pages/login/Login.css index bb23ae3..06d54e2 100644 --- a/src/pages/login/Login.css +++ b/src/pages/login/Login.css @@ -1,27 +1,27 @@ .login-container { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - height: 100%; - width: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100%; + width: 100%; } .login-form { - max-width: 40%; - width: 100%; + max-width: 40%; + width: 100%; } .login-form-buttons { - display: flex; - flex-direction: column; - margin-top: 20px; + display: flex; + flex-direction: column; + margin-top: 20px; } .login-toggle { - display: flex; - justify-content: center; - align-items: center; - margin-top: 16px; - gap: 4px; -} \ No newline at end of file + display: flex; + justify-content: center; + align-items: center; + margin-top: 16px; + gap: 4px; +} diff --git a/src/pages/login/Login.tsx b/src/pages/login/Login.tsx index bf64d97..41ed8ff 100644 --- a/src/pages/login/Login.tsx +++ b/src/pages/login/Login.tsx @@ -10,8 +10,8 @@ import { } from "@ionic/react"; import { useCallback, useState } from "react"; import "./Login.css"; -import { api } from "../../lib/api"; import { useAuth } from "../../hooks/useAuth"; +import { api } from "../../lib/api"; export default function Login() { const { login } = useAuth();