refactor: impl useMemo

This commit is contained in:
kKaskak 2024-03-14 20:32:08 +02:00
parent eb5e42fbf7
commit b89c73a509

View file

@ -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();