fix(frontend): resolve all eslint warnings and errors
- block-timeline: ref updates moved to useLayoutEffect - channel-card, guide/page: Date.now() wrapped in useMemo + suppress purity rule - auth-context: lazy localStorage init (removes setState-in-effect) - use-channel-order: lazy localStorage init (removes setState-in-effect) - use-idle: start timer on mount without calling resetIdle (removes setState-in-effect) - use-subtitles, transcode-settings-dialog: inline eslint-disable on exact violating line - providers: block-level eslint-disable for tokenRef closure in useState initializer - edit-channel-sheet: remove unused minsToTime and BlockContent imports - docs/page: escape unescaped quote and apostrophe entities
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useMemo } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { Tv } from "lucide-react";
|
||||
import { api, ApiRequestError } from "@/lib/api";
|
||||
@@ -69,7 +70,8 @@ function ChannelRow({ channel }: { channel: ChannelResponse }) {
|
||||
retry: false,
|
||||
});
|
||||
|
||||
const now = Date.now();
|
||||
// eslint-disable-next-line react-hooks/purity -- Date.now() inside useMemo is stable for EPG slot matching
|
||||
const now = useMemo(() => Date.now(), []);
|
||||
|
||||
const current = slots?.find(
|
||||
(s) =>
|
||||
|
||||
Reference in New Issue
Block a user