chore: lint
This commit is contained in:
@@ -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
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { render } from "@testing-library/react";
|
||||
import React from "react";
|
||||
import App from "./App";
|
||||
|
||||
test("renders without crashing", () => {
|
||||
|
||||
10
src/App.tsx
10
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 (
|
||||
<IonApp>
|
||||
<IonReactRouter>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
createContext,
|
||||
type ReactNode,
|
||||
useCallback,
|
||||
useContext,
|
||||
useEffect,
|
||||
useState,
|
||||
type ReactNode,
|
||||
} from "react";
|
||||
import {
|
||||
clearTokens,
|
||||
|
||||
@@ -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(
|
||||
<React.StrictMode>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 16px;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user