diff --git a/src/Shell.tsx b/src/Shell.tsx index dead12d..33cbcc2 100644 --- a/src/Shell.tsx +++ b/src/Shell.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren, useEffect, useRef, useState } from "react"; +import { type PropsWithChildren, useEffect, useRef, useState } from "react"; import { Button } from "./components/Button"; import { motion } from "framer-motion"; import { diff --git a/src/atoms.ts b/src/atoms.ts index 6331c7f..7b0749b 100644 --- a/src/atoms.ts +++ b/src/atoms.ts @@ -1,6 +1,6 @@ import { atom } from "jotai"; import { atomWithStorage } from "jotai/utils"; -import { FeedItem } from "./components/Feed/FeedItem"; +import type { FeedItem } from "./components/Feed/FeedItem"; export const gameIdAtom = atom(undefined); export const loginTokenAtom = atomWithStorage( diff --git a/src/components/Feed/FeedItem.tsx b/src/components/Feed/FeedItem.tsx index aa72434..1d99dc0 100644 --- a/src/components/Feed/FeedItem.tsx +++ b/src/components/Feed/FeedItem.tsx @@ -1,8 +1,8 @@ import { motion } from "framer-motion"; -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { formatTimeSpan } from "../../../shared/time"; import GemsIcon from "../GemIcon"; -import { Rarity as RarityType } from "../../../shared/lootboxes"; +import type { Rarity as RarityType } from "../../../shared/lootboxes"; import { Rarity } from "../Rarity"; import { themes } from "../../themes"; diff --git a/src/components/PastMatch.tsx b/src/components/PastMatch.tsx index 43a446c..6eafdfe 100644 --- a/src/components/PastMatch.tsx +++ b/src/components/PastMatch.tsx @@ -1,5 +1,5 @@ import { Link } from "wouter"; -import { ServerGame } from "../../shared/game"; +import type { ServerGame } from "../../shared/game"; import { formatRelativeTime, formatTimeSpan } from "../../shared/time"; import { Button } from "./Button"; diff --git a/src/components/Popover.tsx b/src/components/Popover.tsx index fe5daa2..be7a020 100644 --- a/src/components/Popover.tsx +++ b/src/components/Popover.tsx @@ -1,5 +1,5 @@ import * as PopoverPrimitive from "@radix-ui/react-popover"; -import { forwardRef, PropsWithChildren } from "react"; +import { forwardRef, type PropsWithChildren } from "react"; import { cn } from "../lib/utils"; const Popover = PopoverPrimitive.Root; diff --git a/src/components/Rarity.tsx b/src/components/Rarity.tsx index 4e19d4b..8aa6d08 100644 --- a/src/components/Rarity.tsx +++ b/src/components/Rarity.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { cn } from "../lib/utils"; import { rarities } from "../../shared/lootboxes"; diff --git a/src/components/pixi/PixiViewport.tsx b/src/components/pixi/PixiViewport.tsx index 2822e25..31a1530 100644 --- a/src/components/pixi/PixiViewport.tsx +++ b/src/components/pixi/PixiViewport.tsx @@ -1,6 +1,9 @@ import React from "react"; import type { Application } from "pixi.js"; -import { IClampZoomOptions, Viewport as PixiViewport } from "pixi-viewport"; +import { + type IClampZoomOptions, + Viewport as PixiViewport, +} from "pixi-viewport"; import { PixiComponent, useApp } from "@pixi/react"; import { BaseTexture, SCALE_MODES } from "pixi.js"; BaseTexture.defaultOptions.scaleMode = SCALE_MODES.NEAREST; diff --git a/src/views/settings/Settings.tsx b/src/views/settings/Settings.tsx index 878073f..61d5cd7 100644 --- a/src/views/settings/Settings.tsx +++ b/src/views/settings/Settings.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from "react"; +import type { ReactNode } from "react"; import { Switch } from "../../components/Switch"; import { useWSMutation, useWSQuery } from "../../hooks"; diff --git a/src/wsClient.ts b/src/wsClient.ts index ce4293e..7678e02 100644 --- a/src/wsClient.ts +++ b/src/wsClient.ts @@ -24,7 +24,6 @@ const createWSClient = () => { let ws = new WebSocket(connectionString); let reconnectAttempts = 0; const maxReconnectAttempts = 5; - let isAuthenticated = false; const connect = () => { ws = new WebSocket(connectionString); @@ -35,7 +34,6 @@ const createWSClient = () => { if (token) { try { await dispatch("user.loginWithToken", { token: JSON.parse(token) }); - isAuthenticated = true; } catch (e) { console.error("Re-authentication failed", e); }