Skip to content

Commit c5dbc20

Browse files
chore(web): drop a lint directive that no longer suppresses anything
1 parent 4b73907 commit c5dbc20

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎apps/web/src/components/settings/IntegrationsSettings.tsx‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
} from "@t3tools/contracts";
3737
import { PREVIEW_VIEWPORT_PRESETS } from "@t3tools/shared/previewViewport";
3838
import { InfoIcon, MoreVertical, Plus as PlusIcon } from "lucide-react";
39-
import { useEffect, useRef, useState, type ReactNode } from "react";
39+
import { useCallback, useEffect, useRef, useState, type ReactNode } from "react";
4040

4141
import { ScreenRotationIcon } from "~/browser/ScreenRotationIcon";
4242
import { resolveEnvironmentOptionLabel } from "~/components/BranchToolbar.logic";
@@ -793,19 +793,18 @@ function BrowserProfilesSetting({ disabled }: { readonly disabled: boolean }) {
793793
// Refreshed without blanking the last result: the menu shows the cached list
794794
// straight away so it doesn't reflow on open, and the source list is stable
795795
// (names only) since choosing what to import happens in the wizard, not here.
796-
const loadSources = () => {
796+
const loadSources = useCallback(() => {
797797
if (!previewBridge) return;
798798
void previewBridge
799799
.listBrowserImportSources()
800800
.then(setSources)
801801
.catch(() => setSources((previous) => previous ?? []));
802-
};
802+
}, []);
803803

804804
// Loaded once so the first open is instant instead of flashing a spinner.
805805
useEffect(() => {
806806
loadSources();
807-
// eslint-disable-next-line react-hooks/exhaustive-deps
808-
}, []);
807+
}, [loadSources]);
809808

810809
// Runs one import for the wizard. A new profile is registered only once the
811810
// import succeeds — the cookies land in its partition first — so a blocked

0 commit comments

Comments
 (0)