From b89c73a5093e4a3da7e580358a326e64791f8992 Mon Sep 17 00:00:00 2001 From: kKaskak <117831817+kKaskak@users.noreply.github.com> Date: Thu, 14 Mar 2024 20:32:08 +0200 Subject: [PATCH] refactor: impl useMemo --- src/common/LibItem/LibItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/LibItem/LibItem.js b/src/common/LibItem/LibItem.js index 67e3da0db..870690e2e 100644 --- a/src/common/LibItem/LibItem.js +++ b/src/common/LibItem/LibItem.js @@ -8,13 +8,13 @@ const { t } = require('i18next'); const LibItem = ({ _id, removable, notifications, watched, ...props }) => { - const OPTIONS = [ + const OPTIONS = React.useMemo( () => [ { label: 'LIBRARY_PLAY', value: 'play' }, { label: 'LIBRARY_DETAILS', value: 'details' }, { label: 'LIBRARY_RESUME_DISMISS', value: 'dismiss' }, { label: watched ? 'CTX_MARK_UNWATCHED' : 'CTX_MARK_WATCHED', value: 'watched' }, { label: 'LIBRARY_REMOVE', value: 'remove' }, - ]; + ]); const { core } = useServices();