chore: make eslint happy (part 1) (#4890)

This commit is contained in:
Sukka
2025-09-30 14:19:49 +08:00
committed by GitHub
parent ecdeadfe1e
commit 0c88568cd7
8 changed files with 27 additions and 23 deletions

View File

@@ -90,13 +90,11 @@ export const HotkeyInput = (props: Props) => {
<div className="list">
{keys.map((key, index) => (
<Box display="flex">
<Box display="flex" key={key}>
<span className="delimiter" hidden={index === 0}>
+
</span>
<div key={key} className="item">
{key}
</div>
<div className="item">{key}</div>
</Box>
))}
</div>

View File

@@ -59,13 +59,13 @@ const SettingVergeAdvanced = ({ onError: _ }: Props) => {
const onExportDiagnosticInfo = useCallback(async () => {
await exportDiagnosticInfo();
showNotice("success", t("Copy Success"), 1000);
}, []);
}, [t]);
const copyVersion = useCallback(() => {
navigator.clipboard.writeText(`v${version}`).then(() => {
showNotice("success", t("Version copied to clipboard"), 1000);
});
}, [version, t]);
}, [t]);
return (
<SettingList title={t("Verge Advanced Setting")}>

View File

@@ -77,7 +77,7 @@ const SettingVergeBasic = ({ onError }: Props) => {
const onCopyClashEnv = useCallback(async () => {
await copyClashEnv();
showNotice("success", t("Copy Success"), 1000);
}, []);
}, [t]);
return (
<SettingList title={t("Verge Basic Setting")}>