- {_.capitalize(t('chain_ticker'))}:
+ {capitalize(t('chain_ticker'))}:
setWalletsArrayProperty(selectedWallet, 'chainTicker', e.target.value)}
@@ -111,7 +111,7 @@ const CryptoWalletsForm = ({ account }: { account: Account | undefined }) => {
/>
- {_.capitalize(t('wallet_address'))}:
+ {capitalize(t('wallet_address'))}:
setWalletsArrayProperty(selectedWallet, 'address', e.target.value)}
@@ -133,7 +133,7 @@ const CryptoWalletsForm = ({ account }: { account: Account | undefined }) => {
- {_.capitalize(t('timestamp'))}:
+ {capitalize(t('timestamp'))}:
setWalletsArrayProperty(selectedWallet, 'timestamp', Number(e.target.value))}
@@ -142,7 +142,7 @@ const CryptoWalletsForm = ({ account }: { account: Account | undefined }) => {
/>
-
{_.capitalize(t('paste_signature'))}:
+
{capitalize(t('paste_signature'))}:
setWalletsArrayProperty(selectedWallet, 'signature', e.target.value)}
diff --git a/src/components/settings-modal/interface-settings/interface-settings.tsx b/src/components/settings-modal/interface-settings/interface-settings.tsx
index 9be9bf36..8146db14 100644
--- a/src/components/settings-modal/interface-settings/interface-settings.tsx
+++ b/src/components/settings-modal/interface-settings/interface-settings.tsx
@@ -4,7 +4,7 @@ import useAvatarVisibilityStore from '../../../stores/use-avatar-visibility-stor
import useTheme from '../../../hooks/use-theme';
import packageJson from '../../../../package.json';
import styles from './interface-settings.module.css';
-import _ from 'lodash';
+import { capitalize } from 'lodash';
import useInterfaceSettingsStore from '../../../stores/use-interface-settings-store';
import useCatalogFiltersStore from '../../../stores/use-catalog-filters-store';
import useExpandedMediaStore from '../../../stores/use-expanded-media-store';
@@ -138,16 +138,16 @@ const InterfaceSettings = () => {
return (
- {_.capitalize(t('version'))}:
+ {capitalize(t('version'))}:
- {_.capitalize(t('update'))}:
+ {capitalize(t('update'))}:
- {_.capitalize(t('style'))}:
+ {capitalize(t('style'))}:
- {_.capitalize(t('interface_language'))}:
+ {capitalize(t('interface_language'))}:
-
{_.capitalize(t('threads_without_images_tip'))}
+
{capitalize(t('threads_without_images_tip'))}
-
{_.capitalize(t('fit_expanded_images_to_screen_tip'))}
+
{capitalize(t('fit_expanded_images_to_screen_tip'))}
);
diff --git a/src/components/topbar/topbar.tsx b/src/components/topbar/topbar.tsx
index 13694bdd..7527096d 100644
--- a/src/components/topbar/topbar.tsx
+++ b/src/components/topbar/topbar.tsx
@@ -15,14 +15,14 @@ import useTopbarVisibilityStore from '../../stores/use-topbar-visibility-store';
import useDirectoryModalStore from '../../stores/use-directory-modal-store';
import { BOARD_CODE_GROUPS, getAllBoardCodes } from '../../constants/board-codes';
import styles from './topbar.module.css';
-import _, { debounce } from 'lodash';
+import { capitalize, debounce, lowerCase } from 'lodash';
const SearchBar = ({ setShowSearchBar }: { setShowSearchBar: (show: boolean) => void }) => {
const { t } = useTranslation();
const navigate = useNavigate();
const searchBarRef = useRef
(null);
const searchInputRef = useRef(null);
- const placeholder = _.lowerCase(t('enter_board_address'));
+ const placeholder = lowerCase(t('enter_board_address'));
useEffect(() => {
searchInputRef.current?.focus();
@@ -229,7 +229,7 @@ const TopBarDesktop = () => {
)}
[
openTopbarEditModal()} style={{ cursor: 'pointer' }}>
- {_.capitalize(t('edit'))}
+ {capitalize(t('edit'))}
] [
openCreateBoardModal()} style={{ cursor: 'pointer' }}>
@@ -338,7 +338,7 @@ const TopBarMobile = ({ subplebbitAddress }: { subplebbitAddress: string }) => {
{t('settings')}
- setShowSearchBar(!showSearchBar)}>{_.capitalize(t('search'))}
+ setShowSearchBar(!showSearchBar)}>{capitalize(t('search'))}
{t('home')}
{showSearchBar && }
diff --git a/src/views/home/home.tsx b/src/views/home/home.tsx
index 2dfda82d..0c861586 100644
--- a/src/views/home/home.tsx
+++ b/src/views/home/home.tsx
@@ -12,7 +12,7 @@ import useDirectoryModalStore from '../../stores/use-directory-modal-store';
import DisclaimerModal from '../../components/disclaimer-modal';
import DirectoryModal from '../../components/directory-modal';
import { getBoardPath } from '../../lib/utils/route-utils';
-import _ from 'lodash';
+import { lowerCase } from 'lodash';
// https://github.com/plebbit/lists/blob/master/5chan-directories.json
@@ -40,7 +40,7 @@ const SearchBar = () => {
spellCheck='false'
autoCapitalize='off'
type='text'
- placeholder={_.lowerCase(t('enter_board_address'))}
+ placeholder={lowerCase(t('enter_board_address'))}
ref={searchInputRef}
/>
diff --git a/src/views/mod-queue/mod-queue.tsx b/src/views/mod-queue/mod-queue.tsx
index 8c7d061e..17e2e6b8 100644
--- a/src/views/mod-queue/mod-queue.tsx
+++ b/src/views/mod-queue/mod-queue.tsx
@@ -21,7 +21,7 @@ import { alertChallengeVerificationFailed } from '../../lib/utils/challenge-util
import Tooltip from '../../components/tooltip';
import useIsMobile from '../../hooks/use-is-mobile';
import { Post } from '../post/post';
-import _ from 'lodash';
+import { capitalize, lowerCase } from 'lodash';
const { addChallenge } = useChallengesStore.getState();
@@ -273,7 +273,7 @@ const ModQueueRow = ({ comment, isOdd = false }: ModQueueRowProps) => {
{getFormattedDate(timestamp)}} content={getFormattedTimeAgo(timestamp)} />
)}