Remove useless useCallback

This commit is contained in:
Half-Shot
2024-11-08 09:49:09 +00:00
parent 63f1b7346f
commit 19626324c7

View File

@@ -1,11 +1,11 @@
/* /*
Copyright 2022-2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { ChangeEvent, FC, useCallback } from "react"; import { ChangeEvent, FC } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Text } from "@vector-im/compound-web"; import { Text } from "@vector-im/compound-web";
@@ -29,12 +29,12 @@ export const PreferencesSettingsTab: FC = () => {
playReactionsSoundSetting, playReactionsSoundSetting,
); );
const onChangeSetting = useCallback( const onChangeSetting = (
(e: ChangeEvent<HTMLInputElement>, fn: (value: boolean) => void) => { e: ChangeEvent<HTMLInputElement>,
fn(e.target.checked); fn: (value: boolean) => void,
}, ) => {
[], fn(e.target.checked);
); };
return ( return (
<div> <div>