pl-fe: Remove barrel exports for stores

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-10-19 14:59:49 +02:00
parent b80fd1c966
commit 2367971c87
92 changed files with 101 additions and 96 deletions

View file

@ -1,5 +1,5 @@
import { changeSetting } from 'pl-fe/actions/settings';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import type { AppDispatch, RootState } from 'pl-fe/store';

View file

@ -7,7 +7,8 @@ import emojiSearch from 'pl-fe/features/emoji/search';
import { Language } from 'pl-fe/features/preferences';
import { selectAccount, selectOwnAccount, makeGetAccount } from 'pl-fe/selectors';
import { tagHistory } from 'pl-fe/settings';
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useSettingsStore } from 'pl-fe/stores/settings';
import toast from 'pl-fe/toast';
import { isLoggedIn } from 'pl-fe/utils/auth';

View file

@ -1,7 +1,7 @@
import { defineMessages } from 'react-intl';
import { getClient } from 'pl-fe/api';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
import { importFetchedAccounts, importFetchedStatus, importFetchedStatuses } from './importer';

View file

@ -1,6 +1,6 @@
import { defineMessages } from 'react-intl';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast, { type IToastOptions } from 'pl-fe/toast';
import { isLoggedIn } from 'pl-fe/utils/auth';

View file

@ -1,7 +1,7 @@
import { selectAccount } from 'pl-fe/selectors';
import { setSentryAccount } from 'pl-fe/sentry';
import KVStore from 'pl-fe/storage/kv-store';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { getAuthUserId, getAuthUserUrl } from 'pl-fe/utils/auth';
import { getClient } from '../api';

View file

@ -1,4 +1,4 @@
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { ModalType } from 'pl-fe/features/ui/components/modal-root';
import type { OpenModalProps } from 'pl-fe/stores/modals';

View file

@ -8,7 +8,7 @@ import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import AccountContainer from 'pl-fe/containers/account-container';
import { selectAccount } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
import type { AppDispatch, RootState } from 'pl-fe/store';

View file

@ -1,4 +1,4 @@
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { Account } from 'pl-fe/normalizers';
import type { AppDispatch } from 'pl-fe/store';

View file

@ -6,7 +6,7 @@ import { getClient } from 'pl-fe/api';
import { getNotificationStatus } from 'pl-fe/features/notifications/components/notification';
import { normalizeNotification, normalizeNotifications, type Notification } from 'pl-fe/normalizers';
import { getFilters, regexFromFilters } from 'pl-fe/selectors';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { isLoggedIn } from 'pl-fe/utils/auth';
import { compareId } from 'pl-fe/utils/comparators';
import { unescapeHTML } from 'pl-fe/utils/html';

View file

@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
import { getHost } from 'pl-fe/actions/instance';
import { normalizePlFeConfig } from 'pl-fe/normalizers';
import KVStore from 'pl-fe/storage/kv-store';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { getClient, staticFetch } from '../api';

View file

@ -1,5 +1,5 @@
import { changeSetting } from 'pl-fe/actions/settings';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import type { AppDispatch, RootState } from 'pl-fe/store';

View file

@ -1,4 +1,4 @@
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { getClient } from '../api';

View file

@ -1,4 +1,4 @@
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { getClient } from '../api';

View file

@ -5,7 +5,7 @@ import { getClient } from 'pl-fe/api';
import messages from 'pl-fe/messages';
import { makeGetAccount } from 'pl-fe/selectors';
import KVStore from 'pl-fe/storage/kv-store';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import toast from 'pl-fe/toast';
import { isLoggedIn } from 'pl-fe/utils/auth';

View file

@ -1,4 +1,5 @@
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { isLoggedIn } from 'pl-fe/utils/auth';
import { shouldHaveCard } from 'pl-fe/utils/status';

View file

@ -1,7 +1,7 @@
import { Map as ImmutableMap } from 'immutable';
import { getLocale } from 'pl-fe/actions/settings';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { shouldFilter } from 'pl-fe/utils/timelines';
import { getClient } from '../api';

View file

@ -14,7 +14,7 @@ import { selectEntity } from 'pl-fe/entity-store/selectors';
import { useAppDispatch, useLoggedIn } from 'pl-fe/hooks';
import messages from 'pl-fe/messages';
import { queryClient } from 'pl-fe/queries/client';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { getUnreadChatsCount, updateChatListItem } from 'pl-fe/utils/chats';
import { play, soundCache } from 'pl-fe/utils/sounds';

View file

@ -2,7 +2,7 @@ import React, { Suspense } from 'react';
import { MediaGallery } from 'pl-fe/features/ui/util/async-components';
import { useSettings } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { isMediaVisible } from './statuses/sensitive-content-overlay';

View file

@ -8,7 +8,8 @@ import HStack from 'pl-fe/components/ui/hstack';
import IconButton from 'pl-fe/components/ui/icon-button';
import Portal from 'pl-fe/components/ui/portal';
import { userTouching } from 'pl-fe/is-mobile';
import { useUiStore, useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useUiStore } from 'pl-fe/stores/ui';
import DropdownMenuItem, { MenuItem } from './dropdown-menu-item';

View file

@ -3,7 +3,7 @@ import debounce from 'lodash/debounce';
import React, { useRef } from 'react';
import { isMobile } from 'pl-fe/is-mobile';
import { useStatusHoverCardStore } from 'pl-fe/stores';
import { useStatusHoverCardStore } from 'pl-fe/stores/status-hover-card';
const showStatusHoverCard = debounce((openStatusHoverCard, ref, statusId) => {
openStatusHoverCard(ref, statusId);

View file

@ -7,7 +7,7 @@ import 'wicg-inert';
import { cancelReplyCompose } from 'pl-fe/actions/compose';
import { saveDraftStatus } from 'pl-fe/actions/draft-statuses';
import { useAppDispatch, usePrevious } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { ModalType } from 'pl-fe/features/ui/components/modal-root';
import type { ReducerCompose } from 'pl-fe/reducers/compose';

View file

@ -5,7 +5,7 @@ import { vote } from 'pl-fe/actions/polls';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import PollFooter from './poll-footer';
import PollOption from './poll-option';

View file

@ -15,7 +15,8 @@ import Text from 'pl-fe/components/ui/text';
import ProfileStats from 'pl-fe/features/ui/components/profile-stats';
import { useAppDispatch, useAppSelector, useFeatures, useInstance, useRegistrationStatus } from 'pl-fe/hooks';
import { makeGetOtherAccounts } from 'pl-fe/selectors';
import { useUiStore, useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { useUiStore } from 'pl-fe/stores/ui';
import sourceCode from 'pl-fe/utils/code';
import type { List as ImmutableList } from 'immutable';

View file

@ -23,7 +23,7 @@ import EmojiPickerDropdown from 'pl-fe/features/emoji/containers/emoji-picker-dr
import { languages } from 'pl-fe/features/preferences';
import { useAppDispatch, useAppSelector, useFeatures, useInstance, useOwnAccount, useSettings } from 'pl-fe/hooks';
import { useChats } from 'pl-fe/queries/chats';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
import copy from 'pl-fe/utils/copy';

View file

@ -9,7 +9,7 @@ import { showStatusHoverCard } from 'pl-fe/components/hover-status-wrapper';
import Card, { CardBody } from 'pl-fe/components/ui/card';
import StatusContainer from 'pl-fe/containers/status-container';
import { useAppSelector, useAppDispatch } from 'pl-fe/hooks';
import { useStatusHoverCardStore } from 'pl-fe/stores';
import { useStatusHoverCardStore } from 'pl-fe/stores/status-hover-card';
interface IStatusHoverCard {
visible?: boolean;

View file

@ -5,7 +5,7 @@ import PreviewCard from 'pl-fe/components/preview-card';
import PlaceholderCard from 'pl-fe/features/placeholder/components/placeholder-card';
import { MediaGallery, Video, Audio } from 'pl-fe/features/ui/util/async-components';
import { useSettings } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { isMediaVisible } from './statuses/sensitive-content-overlay';

View file

@ -11,7 +11,7 @@ import Text from 'pl-fe/components/ui/text';
import EmojiPickerDropdown from 'pl-fe/features/emoji/containers/emoji-picker-dropdown-container';
import unicodeMapping from 'pl-fe/features/emoji/mapping';
import { useAppDispatch, useFeatures, useLoggedIn, useSettings } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import AnimatedNumber from './animated-number';

View file

@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
import HoverAccountWrapper from 'pl-fe/components/hover-account-wrapper';
import HoverStatusWrapper from 'pl-fe/components/hover-status-wrapper';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { Status } from 'pl-fe/normalizers';

View file

@ -17,7 +17,7 @@ import QuotedStatus from 'pl-fe/features/status/containers/quoted-status-contain
import { HotKeys } from 'pl-fe/features/ui/components/hotkeys';
import { useAppDispatch, useAppSelector, useSettings } from 'pl-fe/hooks';
import { makeGetStatus, type SelectedStatus } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { textForScreenReader } from 'pl-fe/utils/status';
import EventPreview from './event-preview';

View file

@ -8,7 +8,8 @@ import Icon from 'pl-fe/components/ui/icon';
import { useStatContext } from 'pl-fe/contexts/stat-context';
import { Entities } from 'pl-fe/entity-store/entities';
import { useAppDispatch, useAppSelector, useFeatures, useOwnAccount } from 'pl-fe/hooks';
import { useModalsStore, useUiStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useUiStore } from 'pl-fe/stores/ui';
import { isStandalone } from 'pl-fe/utils/state';
const messages = defineMessages({

View file

@ -19,7 +19,7 @@ import Icon from 'pl-fe/components/ui/icon';
import IconButton from 'pl-fe/components/ui/icon-button';
import Motion from 'pl-fe/features/ui/util/optional-motion';
import { useSettings } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { MediaAttachment } from 'pl-api';

View file

@ -11,7 +11,7 @@ import Column from 'pl-fe/components/ui/column';
import Spinner from 'pl-fe/components/ui/spinner';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { type AccountGalleryAttachment, getAccountGallery } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import MediaItem from './components/media-item';

View file

@ -25,7 +25,8 @@ import SubscriptionButton from 'pl-fe/features/ui/components/subscription-button
import { useAppDispatch, useAppSelector, useFeatures, useOwnAccount } from 'pl-fe/hooks';
import { useChats } from 'pl-fe/queries/chats';
import { queryClient } from 'pl-fe/queries/client';
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useSettingsStore } from 'pl-fe/stores/settings';
import toast from 'pl-fe/toast';
import { isDefaultHeader } from 'pl-fe/utils/accounts';
import copy from 'pl-fe/utils/copy';

View file

@ -9,7 +9,7 @@ import HStack from 'pl-fe/components/ui/hstack';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { AdminAnnouncement } from 'pl-fe/normalizers';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
const messages = defineMessages({

View file

@ -9,7 +9,7 @@ import Column from 'pl-fe/components/ui/column';
import HStack from 'pl-fe/components/ui/hstack';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
import Indicator from '../developers/components/indicator';

View file

@ -8,7 +8,7 @@ import Column from 'pl-fe/components/ui/column';
import HStack from 'pl-fe/components/ui/hstack';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
import type { AdminRule } from 'pl-api';

View file

@ -9,7 +9,7 @@ import Button from 'pl-fe/components/ui/button';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { getRedirectUrl } from 'pl-fe/utils/redirect';
import { isStandalone } from 'pl-fe/utils/state';

View file

@ -17,7 +17,7 @@ import Select from 'pl-fe/components/ui/select';
import Textarea from 'pl-fe/components/ui/textarea';
import CaptchaField from 'pl-fe/features/auth-login/components/captcha';
import { useAppDispatch, useSettings, useFeatures, useInstance } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { CreateAccountParams } from 'pl-api';

View file

@ -10,7 +10,7 @@ import Spinner from 'pl-fe/components/ui/spinner';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { OauthToken } from 'pl-api';

View file

@ -12,7 +12,7 @@ import StatusList from 'pl-fe/components/status-list';
import Column from 'pl-fe/components/ui/column';
import { useAppSelector, useAppDispatch, useTheme } from 'pl-fe/hooks';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
const messages = defineMessages({

View file

@ -13,7 +13,7 @@ import { useChatContext } from 'pl-fe/contexts/chat-context';
import UploadButton from 'pl-fe/features/compose/components/upload-button';
import emojiSearch from 'pl-fe/features/emoji/search';
import { useAppDispatch, useInstance } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { textAtCursorMatchesToken } from 'pl-fe/utils/suggestions';
import ChatTextarea from './chat-textarea';

View file

@ -14,7 +14,7 @@ import VerificationBadge from 'pl-fe/components/verification-badge';
import { useChatContext } from 'pl-fe/contexts/chat-context';
import { useFeatures } from 'pl-fe/hooks';
import { useChatActions } from 'pl-fe/queries/chats';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { Chat } from 'pl-api';
import type { Menu } from 'pl-fe/components/dropdown-menu';

View file

@ -14,7 +14,7 @@ import { MediaGallery } from 'pl-fe/features/ui/util/async-components';
import { useAppSelector } from 'pl-fe/hooks';
import { ChatKeys, useChatActions } from 'pl-fe/queries/chats';
import { queryClient } from 'pl-fe/queries/client';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { stripHTML } from 'pl-fe/utils/html';
import { onlyEmoji } from 'pl-fe/utils/rich-content';

View file

@ -14,7 +14,7 @@ import { useChatContext } from 'pl-fe/contexts/chat-context';
import { Entities } from 'pl-fe/entity-store/entities';
import { useAppDispatch, useAppSelector, useFeatures } from 'pl-fe/hooks';
import { useChat, useChatActions, useChats } from 'pl-fe/queries/chats';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import Chat from '../../chat';

View file

@ -3,7 +3,7 @@ import React from 'react';
import Blurhash from 'pl-fe/components/blurhash';
import Icon from 'pl-fe/components/ui/icon';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import ChatUploadPreview from './chat-upload-preview';

View file

@ -11,7 +11,7 @@ import { ChatWidgetScreens, useChatContext } from 'pl-fe/contexts/chat-context';
import { Entities } from 'pl-fe/entity-store/entities';
import { useAppDispatch, useAppSelector, useFeatures } from 'pl-fe/hooks';
import { useChatActions } from 'pl-fe/queries/chats';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import ChatPaneHeader from './chat-pane-header';

View file

@ -16,7 +16,7 @@ import ProgressBar from 'pl-fe/components/ui/progress-bar';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useAppDispatch, useOwnAccount } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
const toRad = (x: number) => x * (Math.PI / 180);

View file

@ -2,7 +2,7 @@ import React from 'react';
import { FormattedList, FormattedMessage } from 'react-intl';
import { useCompose, useFeatures } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
interface IReplyMentions {
composeId: string;

View file

@ -32,7 +32,7 @@ import HStack from 'pl-fe/components/ui/hstack';
import Icon from 'pl-fe/components/ui/icon';
import IconButton from 'pl-fe/components/ui/icon-button';
import { useSettings } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { $isImageNode } from './image-node';

View file

@ -5,7 +5,7 @@ import HStack from 'pl-fe/components/ui/hstack';
import Icon from 'pl-fe/components/ui/icon';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { getExplorerUrl } from '../utils/block-explorer';
import { getTitle } from '../utils/coin-db';

View file

@ -1,6 +1,6 @@
import React from 'react';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import DevelopersChallenge from './developers-challenge';
import DevelopersMenu from './developers-menu';

View file

@ -12,7 +12,7 @@ import FormGroup from 'pl-fe/components/ui/form-group';
import Textarea from 'pl-fe/components/ui/textarea';
import SettingToggle from 'pl-fe/features/notifications/components/setting-toggle';
import { useAppDispatch } from 'pl-fe/hooks';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import toast from 'pl-fe/toast';
const isJSONValid = (text: any): boolean => {

View file

@ -13,7 +13,7 @@ import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import ActionButton from 'pl-fe/features/ui/components/action-button';
import { useAppSelector } from 'pl-fe/hooks';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { shortNumberFormat } from 'pl-fe/utils/numbers';
interface IAccountCard {

View file

@ -6,7 +6,8 @@ import { cancelDraftStatus } from 'pl-fe/actions/draft-statuses';
import Button from 'pl-fe/components/ui/button';
import HStack from 'pl-fe/components/ui/hstack';
import { useAppDispatch } from 'pl-fe/hooks';
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useSettingsStore } from 'pl-fe/stores/settings';
import type { Status as StatusEntity } from 'pl-fe/normalizers';
import type { DraftStatus } from 'pl-fe/reducers/draft-statuses';

View file

@ -7,7 +7,7 @@ import Avatar from 'pl-fe/components/ui/avatar';
import HStack from 'pl-fe/components/ui/hstack';
import Icon from 'pl-fe/components/ui/icon';
import { useDraggedFiles } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
const messages = defineMessages({
changeDescriptionHeading: { id: 'group.upload_avatar.alt.heading', defaultMessage: 'Change avatar description' },

View file

@ -8,7 +8,7 @@ import Icon from 'pl-fe/components/ui/icon';
import IconButton from 'pl-fe/components/ui/icon-button';
import Text from 'pl-fe/components/ui/text';
import { useDraggedFiles } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
const messages = defineMessages({
title: { id: 'group.upload_banner.title', defaultMessage: 'Upload background picture' },

View file

@ -4,7 +4,7 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
import { joinEvent, leaveEvent } from 'pl-fe/actions/events';
import Button from 'pl-fe/components/ui/button';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { ButtonThemes } from 'pl-fe/components/ui/button/useButtonStyles';
import type { Status as StatusEntity } from 'pl-fe/normalizers';

View file

@ -21,7 +21,7 @@ import Text from 'pl-fe/components/ui/text';
import VerificationBadge from 'pl-fe/components/verification-badge';
import { useAppDispatch, useFeatures, useOwnAccount, useSettings } from 'pl-fe/hooks';
import { useChats } from 'pl-fe/queries/chats';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import copy from 'pl-fe/utils/copy';
import { download } from 'pl-fe/utils/download';
import { shortNumberFormat } from 'pl-fe/utils/numbers';

View file

@ -13,7 +13,7 @@ import Text from 'pl-fe/components/ui/text';
import QuotedStatus from 'pl-fe/features/status/containers/quoted-status-container';
import { useAppDispatch, useAppSelector, usePlFeConfig } from 'pl-fe/hooks';
import { makeGetStatus } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { Status as StatusEntity } from 'pl-fe/normalizers';

View file

@ -7,7 +7,7 @@ import { CardBody, CardHeader, CardTitle } from 'pl-fe/components/ui/card';
import Column from 'pl-fe/components/ui/column';
import HStack from 'pl-fe/components/ui/hstack';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import EventCarousel from './components/event-carousel';

View file

@ -7,7 +7,7 @@ import Button from 'pl-fe/components/ui/button';
import { importEntities } from 'pl-fe/entity-store/actions';
import { Entities } from 'pl-fe/entity-store/entities';
import { useAppDispatch } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
import type { Group, GroupRelationship } from 'pl-api';

View file

@ -10,7 +10,7 @@ import HStack from 'pl-fe/components/ui/hstack';
import Icon from 'pl-fe/components/ui/icon';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { isDefaultHeader } from 'pl-fe/utils/accounts';
import GroupActionButton from './group-action-button';

View file

@ -12,7 +12,7 @@ import { deleteEntities } from 'pl-fe/entity-store/actions';
import { Entities } from 'pl-fe/entity-store/entities';
import PlaceholderAccount from 'pl-fe/features/placeholder/components/placeholder-account';
import { useAppDispatch } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
import type { Menu as IMenu } from 'pl-fe/components/dropdown-menu';

View file

@ -5,7 +5,7 @@ import { defineMessages, useIntl } from 'react-intl';
import { useLeaveGroup } from 'pl-fe/api/hooks';
import DropdownMenu, { Menu } from 'pl-fe/components/dropdown-menu';
import IconButton from 'pl-fe/components/ui/icon-button';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
const messages = defineMessages({

View file

@ -6,7 +6,7 @@ import LoadMore from 'pl-fe/components/load-more';
import MissingIndicator from 'pl-fe/components/missing-indicator';
import Column from 'pl-fe/components/ui/column';
import Spinner from 'pl-fe/components/ui/spinner';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import MediaItem from '../account-gallery/components/media-item';

View file

@ -9,7 +9,7 @@ import { CardBody, CardHeader, CardTitle } from 'pl-fe/components/ui/card';
import Column from 'pl-fe/components/ui/column';
import Spinner from 'pl-fe/components/ui/spinner';
import Text from 'pl-fe/components/ui/text';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
import ColumnForbidden from '../ui/components/column-forbidden';

View file

@ -8,7 +8,7 @@ import ScrollableList from 'pl-fe/components/scrollable-list';
import Button from 'pl-fe/components/ui/button';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import PlaceholderGroupCard from '../placeholder/components/placeholder-group-card';

View file

@ -12,7 +12,7 @@ import Column from 'pl-fe/components/ui/column';
import Spinner from 'pl-fe/components/ui/spinner';
import { useAppDispatch, useAppSelector, useTheme } from 'pl-fe/hooks';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import Timeline from '../ui/components/timeline';

View file

@ -1,7 +1,7 @@
import React, { useEffect } from 'react';
import { Redirect } from 'react-router-dom';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
const NewStatus = () => {
const { openModal } = useModalsStore();

View file

@ -16,7 +16,8 @@ import StatusContainer from 'pl-fe/containers/status-container';
import { HotKeys } from 'pl-fe/features/ui/components/hotkeys';
import { useAppDispatch, useAppSelector, useInstance, useLoggedIn } from 'pl-fe/hooks';
import { makeGetNotification } from 'pl-fe/selectors';
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { NotificationType } from 'pl-fe/utils/notification';
import type { Notification as BaseNotification } from 'pl-api';

View file

@ -5,7 +5,7 @@ import { FormattedMessage } from 'react-intl';
import BackgroundShapes from 'pl-fe/features/ui/components/background-shapes';
import { useSystemTheme } from 'pl-fe/hooks';
import { normalizePlFeConfig } from 'pl-fe/normalizers';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { generateThemeCss } from 'pl-fe/utils/theme';
interface ISitePreview {

View file

@ -5,7 +5,8 @@ import { cancelScheduledStatus } from 'pl-fe/actions/scheduled-statuses';
import Button from 'pl-fe/components/ui/button';
import HStack from 'pl-fe/components/ui/hstack';
import { useAppDispatch } from 'pl-fe/hooks';
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useSettingsStore } from 'pl-fe/stores/settings';
import type { Status as StatusEntity } from 'pl-fe/normalizers';

View file

@ -7,7 +7,7 @@ import AnimatedNumber from 'pl-fe/components/animated-number';
import HStack from 'pl-fe/components/ui/hstack';
import Text from 'pl-fe/components/ui/text';
import { useFeatures } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { Status } from 'pl-fe/normalizers';

View file

@ -18,7 +18,8 @@ import { HotKeys } from 'pl-fe/features/ui/components/hotkeys';
import PendingStatus from 'pl-fe/features/ui/components/pending-status';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { RootState } from 'pl-fe/store';
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { textForScreenReader } from 'pl-fe/utils/status';
import DetailedStatus from './detailed-status';

View file

@ -14,7 +14,7 @@ import { useFollow } from 'pl-fe/api/hooks';
import Button from 'pl-fe/components/ui/button';
import HStack from 'pl-fe/components/ui/hstack';
import { useAppDispatch, useFeatures, useLoggedIn } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';
import type { Account } from 'pl-fe/normalizers';

View file

@ -8,7 +8,7 @@ import Avatar from 'pl-fe/components/ui/avatar';
import Button from 'pl-fe/components/ui/button';
import HStack from 'pl-fe/components/ui/hstack';
import { useAppDispatch } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
const ComposeButton = () => {
const location = useLocation();

View file

@ -9,7 +9,7 @@ import Avatar from 'pl-fe/components/ui/avatar';
import HStack from 'pl-fe/components/ui/hstack';
import Icon from 'pl-fe/components/ui/icon';
import { useAppDispatch } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
const messages = defineMessages({
publish: { id: 'compose_form.publish', defaultMessage: 'Post' },

View file

@ -4,7 +4,7 @@ import { cancelReplyCompose } from 'pl-fe/actions/compose';
import { cancelEventCompose } from 'pl-fe/actions/events';
import Base from 'pl-fe/components/modal-root';
import { useAppDispatch } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import ModalLoading from './modal-loading';

View file

@ -29,7 +29,7 @@ import AccountContainer from 'pl-fe/containers/account-container';
import { isCurrentOrFutureDate } from 'pl-fe/features/compose/components/schedule-form';
import { ComposeEditor, DatePicker } from 'pl-fe/features/ui/util/async-components';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import UploadButton from './upload-button';

View file

@ -7,7 +7,7 @@ import { saveDraftStatus } from 'pl-fe/actions/draft-statuses';
import { checkComposeContent } from 'pl-fe/components/modal-root';
import Modal from 'pl-fe/components/ui/modal';
import { useAppDispatch, useCompose, useDraggedFiles } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import ComposeForm from '../../../compose/components/compose-form';

View file

@ -8,7 +8,7 @@ import Text from 'pl-fe/components/ui/text';
import Widget from 'pl-fe/components/ui/widget';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { type AccountGalleryAttachment, getGroupGallery } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import MediaItem from '../../../account-gallery/components/media-item';

View file

@ -6,7 +6,7 @@ import Widget from 'pl-fe/components/ui/widget';
import InstanceRestrictions from 'pl-fe/features/federation-restrictions/components/instance-restrictions';
import { useAppSelector, useOwnAccount } from 'pl-fe/hooks';
import { makeGetRemoteInstance } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
const getRemoteInstance = makeGetRemoteInstance();

View file

@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl';
import Button from 'pl-fe/components/ui/button';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
const NewEventPanel = () => {
const { openModal } = useModalsStore();

View file

@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl';
import Button from 'pl-fe/components/ui/button';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
const NewGroupPanel = () => {
const { openModal } = useModalsStore();

View file

@ -8,7 +8,7 @@ import Text from 'pl-fe/components/ui/text';
import Widget from 'pl-fe/components/ui/widget';
import { useAppDispatch, useAppSelector } from 'pl-fe/hooks';
import { type AccountGalleryAttachment, getAccountGallery } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import MediaItem from '../../../account-gallery/components/media-item';

View file

@ -11,7 +11,7 @@ import Text from 'pl-fe/components/ui/text';
import VerificationBadge from 'pl-fe/components/verification-badge';
import { useAppDispatch, useAppSelector, useFeatures } from 'pl-fe/hooks';
import { makeGetAccount } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { Account } from 'pl-fe/normalizers';

View file

@ -34,7 +34,7 @@ import ProfileLayout from 'pl-fe/layouts/profile-layout';
import RemoteInstanceLayout from 'pl-fe/layouts/remote-instance-layout';
import SearchLayout from 'pl-fe/layouts/search-layout';
import StatusLayout from 'pl-fe/layouts/status-layout';
import { useUiStore } from 'pl-fe/stores';
import { useUiStore } from 'pl-fe/stores/ui';
import { getVapidKey } from 'pl-fe/utils/auth';
import { isStandalone } from 'pl-fe/utils/state';

View file

@ -4,7 +4,7 @@ import { useHistory } from 'react-router-dom';
import { resetCompose } from 'pl-fe/actions/compose';
import { FOCUS_EDITOR_COMMAND } from 'pl-fe/features/compose/editor/plugins/focus-plugin';
import { useAppDispatch, useOwnAccount } from 'pl-fe/hooks';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { HotKeys } from '../components/hotkeys';

View file

@ -1,4 +1,4 @@
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
/** Get the user settings from the store */
const useSettings = () => useSettingsStore().settings;

View file

@ -9,7 +9,7 @@ import {
} from 'pl-fe/hooks';
import { normalizePlFeConfig } from 'pl-fe/normalizers';
import { startSentry } from 'pl-fe/sentry';
import { useModalsStore } from 'pl-fe/stores';
import { useModalsStore } from 'pl-fe/stores/modals';
import { generateThemeCss } from 'pl-fe/utils/theme';
const Helmet = React.lazy(() => import('pl-fe/components/helmet'));

View file

@ -7,7 +7,7 @@ import { createSelector } from 'reselect';
import { getLocale } from 'pl-fe/actions/settings';
import { Entities } from 'pl-fe/entity-store/entities';
import { useSettingsStore } from 'pl-fe/stores';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { getDomain } from 'pl-fe/utils/accounts';
import { validId } from 'pl-fe/utils/auth';
import ConfigDB from 'pl-fe/utils/config-db';

View file

@ -1,5 +0,0 @@
export { useAccountHoverCardStore } from './account-hover-card';
export { useModalsStore } from './modals';
export { useSettingsStore } from './settings';
export { useStatusHoverCardStore } from './status-hover-card';
export { useUiStore } from './ui';