refactor: replace default lodash imports with named imports

Replaced `import _ from 'lodash'` with specific named imports (`capitalize`, `lowerCase`, `debounce`, `startCase`) across 18 files. This reduces bundle size and improves tree-shaking efficiency.
This commit is contained in:
plebeius
2026-02-11 19:01:09 +08:00
parent d862550132
commit 18cea185e7
18 changed files with 83 additions and 83 deletions
@@ -6,7 +6,7 @@ import useIsMobile from '../../hooks/use-is-mobile';
import useChallengesStore from '../../stores/use-challenges-store';
import useTheme from '../../hooks/use-theme';
import styles from './challenge-modal.module.css';
import _ from 'lodash';
import { capitalize } from 'lodash';
import { useSpring, animated } from '@react-spring/web';
import { useDrag } from '@use-gesture/react';
@@ -269,7 +269,7 @@ const Challenge = ({ challenge, closeModal }: ChallengeProps) => {
{isIframeChallenge && !showIframeConfirmation ? null : (
<>
<div className={styles.name}>
<input type='text' value={displayName || _.capitalize(t('anonymous'))} disabled />
<input type='text' value={displayName || capitalize(t('anonymous'))} disabled />
</div>
{title && (
<div className={styles.subject}>