Skip to content

Commit

Permalink
fixes lock icon
Browse files Browse the repository at this point in the history
  • Loading branch information
night committed Sep 1, 2024
1 parent 88e333d commit 5334603
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 26 deletions.
21 changes: 0 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"@fortawesome/fontawesome-svg-core": "6.6.0",
"@fortawesome/free-brands-svg-icons": "6.6.0",
"@fortawesome/free-solid-svg-icons": "6.6.0",
"@fortawesome/react-fontawesome": "0.2.2",
"@rsuite/icons": "1.0.3",
"@sentry/browser": "^8.26.0",
"@sentry/webpack-plugin": "^2.22.2",
Expand Down
7 changes: 4 additions & 3 deletions src/common/components/Emote.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import {faLock} from '@fortawesome/free-solid-svg-icons/faLock';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import * as faLock from '@fortawesome/free-solid-svg-icons/faLock';
import {Icon} from '@rsuite/icons';
import classNames from 'classnames';
import React, {useState} from 'react';
import {EmoteTypeFlags, SettingIds} from '../../constants.js';
import {hasFlag} from '../../utils/flags.js';
import {createSrcSet, createSrc, DEFAULT_SIZES} from '../../utils/image.js';
import useStorageState from '../hooks/StorageState.jsx';
import styles from './Emote.module.css';
import FontAwesomeSvgIcon from './FontAwesomeSvgIcon.jsx';

export default function Emote({emote, className, locked, sizes = DEFAULT_SIZES, animating = false}) {
const imageRef = React.useRef(null);
Expand Down Expand Up @@ -59,7 +60,7 @@ export default function Emote({emote, className, locked, sizes = DEFAULT_SIZES,
return (
<div className={styles.lockedEmote}>
{image}
<FontAwesomeIcon icon={faLock} className={styles.lock} />
<Icon as={FontAwesomeSvgIcon} fontAwesomeIcon={faLock} className={styles.lock} />
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/emote_menu/utils/youtube-emotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function getCategoryForChannelId(channelId, categoryName) {
}

function isLocked(emoteId) {
return getLiveChat()?.emojis?.find(({emojiId}) => emojiId === emoteId)?.isLocked ?? true;
return getLiveChat()?.emojis?.find(({emojiId}) => emojiId === emoteId)?.isLocked ?? false;
}

export async function loadYouTubeEmotes() {
Expand Down

0 comments on commit 5334603

Please sign in to comment.