From 2367971c87afec25f9f46644fcae892e26a8521b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 19 Oct 2024 14:59:49 +0200 Subject: [PATCH] pl-fe: Remove barrel exports for stores MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/actions/chats.ts | 2 +- packages/pl-fe/src/actions/compose.ts | 3 ++- packages/pl-fe/src/actions/events.ts | 2 +- packages/pl-fe/src/actions/interactions.ts | 2 +- packages/pl-fe/src/actions/me.ts | 2 +- packages/pl-fe/src/actions/modals.ts | 2 +- packages/pl-fe/src/actions/moderation.tsx | 2 +- packages/pl-fe/src/actions/mutes.ts | 2 +- packages/pl-fe/src/actions/notifications.ts | 2 +- packages/pl-fe/src/actions/pl-fe.ts | 2 +- packages/pl-fe/src/actions/remote-timeline.ts | 2 +- packages/pl-fe/src/actions/reports.ts | 2 +- packages/pl-fe/src/actions/search.ts | 2 +- packages/pl-fe/src/actions/settings.ts | 2 +- packages/pl-fe/src/actions/statuses.ts | 3 ++- packages/pl-fe/src/actions/timelines.ts | 2 +- packages/pl-fe/src/api/hooks/streaming/useUserStream.ts | 2 +- packages/pl-fe/src/components/attachment-thumbs.tsx | 2 +- .../pl-fe/src/components/dropdown-menu/dropdown-menu.tsx | 3 ++- packages/pl-fe/src/components/hover-status-wrapper.tsx | 2 +- packages/pl-fe/src/components/modal-root.tsx | 2 +- packages/pl-fe/src/components/polls/poll.tsx | 2 +- packages/pl-fe/src/components/sidebar-menu.tsx | 3 ++- packages/pl-fe/src/components/status-action-bar.tsx | 2 +- packages/pl-fe/src/components/status-hover-card.tsx | 2 +- packages/pl-fe/src/components/status-media.tsx | 2 +- packages/pl-fe/src/components/status-reactions-bar.tsx | 2 +- packages/pl-fe/src/components/status-reply-mentions.tsx | 2 +- packages/pl-fe/src/components/status.tsx | 2 +- packages/pl-fe/src/components/thumb-navigation.tsx | 3 ++- packages/pl-fe/src/components/upload.tsx | 2 +- packages/pl-fe/src/features/account-gallery/index.tsx | 2 +- packages/pl-fe/src/features/account/components/header.tsx | 3 ++- packages/pl-fe/src/features/admin/announcements.tsx | 2 +- packages/pl-fe/src/features/admin/domains.tsx | 2 +- packages/pl-fe/src/features/admin/rules.tsx | 2 +- .../pl-fe/src/features/auth-login/components/login-page.tsx | 2 +- .../src/features/auth-login/components/registration-form.tsx | 2 +- packages/pl-fe/src/features/auth-token-list/index.tsx | 2 +- packages/pl-fe/src/features/bookmarks/index.tsx | 2 +- .../pl-fe/src/features/chats/components/chat-composer.tsx | 2 +- .../pl-fe/src/features/chats/components/chat-list-item.tsx | 2 +- .../pl-fe/src/features/chats/components/chat-message.tsx | 2 +- .../chats/components/chat-page/components/chat-page-main.tsx | 2 +- packages/pl-fe/src/features/chats/components/chat-upload.tsx | 2 +- .../features/chats/components/chat-widget/chat-settings.tsx | 2 +- packages/pl-fe/src/features/circle/index.tsx | 2 +- .../pl-fe/src/features/compose/components/reply-mentions.tsx | 2 +- .../src/features/compose/editor/nodes/image-component.tsx | 2 +- .../src/features/crypto-donate/components/crypto-address.tsx | 2 +- packages/pl-fe/src/features/developers/index.tsx | 2 +- packages/pl-fe/src/features/developers/settings-store.tsx | 2 +- .../pl-fe/src/features/directory/components/account-card.tsx | 2 +- .../draft-statuses/components/draft-status-action-bar.tsx | 3 ++- .../src/features/edit-profile/components/avatar-picker.tsx | 2 +- .../src/features/edit-profile/components/header-picker.tsx | 2 +- .../src/features/event/components/event-action-button.tsx | 2 +- .../pl-fe/src/features/event/components/event-header.tsx | 2 +- packages/pl-fe/src/features/event/event-information.tsx | 2 +- packages/pl-fe/src/features/events/index.tsx | 2 +- .../src/features/group/components/group-action-button.tsx | 2 +- .../pl-fe/src/features/group/components/group-header.tsx | 2 +- .../src/features/group/components/group-member-list-item.tsx | 2 +- .../src/features/group/components/group-options-button.tsx | 2 +- packages/pl-fe/src/features/group/group-gallery.tsx | 2 +- packages/pl-fe/src/features/group/manage-group.tsx | 2 +- packages/pl-fe/src/features/groups/index.tsx | 2 +- packages/pl-fe/src/features/list-timeline/index.tsx | 2 +- packages/pl-fe/src/features/new-status/index.tsx | 2 +- .../src/features/notifications/components/notification.tsx | 3 ++- .../src/features/pl-fe-config/components/site-preview.tsx | 2 +- .../components/scheduled-status-action-bar.tsx | 3 ++- .../features/status/components/status-interaction-bar.tsx | 2 +- packages/pl-fe/src/features/status/components/thread.tsx | 3 ++- packages/pl-fe/src/features/ui/components/action-button.tsx | 2 +- packages/pl-fe/src/features/ui/components/compose-button.tsx | 2 +- .../src/features/ui/components/floating-action-button.tsx | 2 +- packages/pl-fe/src/features/ui/components/modal-root.tsx | 2 +- .../ui/components/modals/compose-event-modal/index.tsx | 2 +- .../src/features/ui/components/modals/compose-modal.tsx | 2 +- .../src/features/ui/components/panels/group-media-panel.tsx | 2 +- .../ui/components/panels/instance-moderation-panel.tsx | 2 +- .../src/features/ui/components/panels/new-event-panel.tsx | 2 +- .../src/features/ui/components/panels/new-group-panel.tsx | 2 +- .../features/ui/components/panels/profile-media-panel.tsx | 2 +- .../features/ui/components/profile-familiar-followers.tsx | 2 +- packages/pl-fe/src/features/ui/index.tsx | 2 +- packages/pl-fe/src/features/ui/util/global-hotkeys.tsx | 2 +- packages/pl-fe/src/hooks/useSettings.ts | 2 +- packages/pl-fe/src/init/pl-fe-head.tsx | 2 +- packages/pl-fe/src/selectors/index.ts | 2 +- packages/pl-fe/src/stores/index.ts | 5 ----- 92 files changed, 101 insertions(+), 96 deletions(-) delete mode 100644 packages/pl-fe/src/stores/index.ts diff --git a/packages/pl-fe/src/actions/chats.ts b/packages/pl-fe/src/actions/chats.ts index d3835c1db..cfccec407 100644 --- a/packages/pl-fe/src/actions/chats.ts +++ b/packages/pl-fe/src/actions/chats.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/compose.ts b/packages/pl-fe/src/actions/compose.ts index f131916b3..7384edca1 100644 --- a/packages/pl-fe/src/actions/compose.ts +++ b/packages/pl-fe/src/actions/compose.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/events.ts b/packages/pl-fe/src/actions/events.ts index 984ffd68a..64941ee66 100644 --- a/packages/pl-fe/src/actions/events.ts +++ b/packages/pl-fe/src/actions/events.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/interactions.ts b/packages/pl-fe/src/actions/interactions.ts index 5bc7f1dcd..43e467f2a 100644 --- a/packages/pl-fe/src/actions/interactions.ts +++ b/packages/pl-fe/src/actions/interactions.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/me.ts b/packages/pl-fe/src/actions/me.ts index ee4f21f58..03a374ef4 100644 --- a/packages/pl-fe/src/actions/me.ts +++ b/packages/pl-fe/src/actions/me.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/modals.ts b/packages/pl-fe/src/actions/modals.ts index e0049bf26..8b15c3e64 100644 --- a/packages/pl-fe/src/actions/modals.ts +++ b/packages/pl-fe/src/actions/modals.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/moderation.tsx b/packages/pl-fe/src/actions/moderation.tsx index 8358b701a..ddb490f2f 100644 --- a/packages/pl-fe/src/actions/moderation.tsx +++ b/packages/pl-fe/src/actions/moderation.tsx @@ -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'; diff --git a/packages/pl-fe/src/actions/mutes.ts b/packages/pl-fe/src/actions/mutes.ts index 5fcd5527d..d2c87f45d 100644 --- a/packages/pl-fe/src/actions/mutes.ts +++ b/packages/pl-fe/src/actions/mutes.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/notifications.ts b/packages/pl-fe/src/actions/notifications.ts index 221c4f935..1d1dce8df 100644 --- a/packages/pl-fe/src/actions/notifications.ts +++ b/packages/pl-fe/src/actions/notifications.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/pl-fe.ts b/packages/pl-fe/src/actions/pl-fe.ts index 604bf5494..f4c981ec7 100644 --- a/packages/pl-fe/src/actions/pl-fe.ts +++ b/packages/pl-fe/src/actions/pl-fe.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/remote-timeline.ts b/packages/pl-fe/src/actions/remote-timeline.ts index 7a4109836..5d431f08b 100644 --- a/packages/pl-fe/src/actions/remote-timeline.ts +++ b/packages/pl-fe/src/actions/remote-timeline.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/reports.ts b/packages/pl-fe/src/actions/reports.ts index c0a1701c6..adc854339 100644 --- a/packages/pl-fe/src/actions/reports.ts +++ b/packages/pl-fe/src/actions/reports.ts @@ -1,4 +1,4 @@ -import { useModalsStore } from 'pl-fe/stores'; +import { useModalsStore } from 'pl-fe/stores/modals'; import { getClient } from '../api'; diff --git a/packages/pl-fe/src/actions/search.ts b/packages/pl-fe/src/actions/search.ts index bd604924d..a72e253f1 100644 --- a/packages/pl-fe/src/actions/search.ts +++ b/packages/pl-fe/src/actions/search.ts @@ -1,4 +1,4 @@ -import { useSettingsStore } from 'pl-fe/stores'; +import { useSettingsStore } from 'pl-fe/stores/settings'; import { getClient } from '../api'; diff --git a/packages/pl-fe/src/actions/settings.ts b/packages/pl-fe/src/actions/settings.ts index 4fd31d5ca..9d2fbf957 100644 --- a/packages/pl-fe/src/actions/settings.ts +++ b/packages/pl-fe/src/actions/settings.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/statuses.ts b/packages/pl-fe/src/actions/statuses.ts index d5d82e061..27edf8b49 100644 --- a/packages/pl-fe/src/actions/statuses.ts +++ b/packages/pl-fe/src/actions/statuses.ts @@ -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'; diff --git a/packages/pl-fe/src/actions/timelines.ts b/packages/pl-fe/src/actions/timelines.ts index b7701ec2a..b2e1db7f7 100644 --- a/packages/pl-fe/src/actions/timelines.ts +++ b/packages/pl-fe/src/actions/timelines.ts @@ -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'; diff --git a/packages/pl-fe/src/api/hooks/streaming/useUserStream.ts b/packages/pl-fe/src/api/hooks/streaming/useUserStream.ts index 0a0bb53a1..c60297266 100644 --- a/packages/pl-fe/src/api/hooks/streaming/useUserStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/useUserStream.ts @@ -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'; diff --git a/packages/pl-fe/src/components/attachment-thumbs.tsx b/packages/pl-fe/src/components/attachment-thumbs.tsx index a78ef82a4..a20c4d899 100644 --- a/packages/pl-fe/src/components/attachment-thumbs.tsx +++ b/packages/pl-fe/src/components/attachment-thumbs.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/dropdown-menu/dropdown-menu.tsx b/packages/pl-fe/src/components/dropdown-menu/dropdown-menu.tsx index 9445652b7..e34a73a0d 100644 --- a/packages/pl-fe/src/components/dropdown-menu/dropdown-menu.tsx +++ b/packages/pl-fe/src/components/dropdown-menu/dropdown-menu.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/hover-status-wrapper.tsx b/packages/pl-fe/src/components/hover-status-wrapper.tsx index 77cfc548f..95502b2e9 100644 --- a/packages/pl-fe/src/components/hover-status-wrapper.tsx +++ b/packages/pl-fe/src/components/hover-status-wrapper.tsx @@ -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); diff --git a/packages/pl-fe/src/components/modal-root.tsx b/packages/pl-fe/src/components/modal-root.tsx index dd658e786..a298b1f62 100644 --- a/packages/pl-fe/src/components/modal-root.tsx +++ b/packages/pl-fe/src/components/modal-root.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/polls/poll.tsx b/packages/pl-fe/src/components/polls/poll.tsx index a54fd5c69..e247de924 100644 --- a/packages/pl-fe/src/components/polls/poll.tsx +++ b/packages/pl-fe/src/components/polls/poll.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/sidebar-menu.tsx b/packages/pl-fe/src/components/sidebar-menu.tsx index 5d28e5076..2a09f1a6d 100644 --- a/packages/pl-fe/src/components/sidebar-menu.tsx +++ b/packages/pl-fe/src/components/sidebar-menu.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/status-action-bar.tsx b/packages/pl-fe/src/components/status-action-bar.tsx index 5564dc4d1..27a6626e1 100644 --- a/packages/pl-fe/src/components/status-action-bar.tsx +++ b/packages/pl-fe/src/components/status-action-bar.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/status-hover-card.tsx b/packages/pl-fe/src/components/status-hover-card.tsx index 3643d3264..bbe068d5d 100644 --- a/packages/pl-fe/src/components/status-hover-card.tsx +++ b/packages/pl-fe/src/components/status-hover-card.tsx @@ -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; diff --git a/packages/pl-fe/src/components/status-media.tsx b/packages/pl-fe/src/components/status-media.tsx index 127ab0fbc..a3402b85e 100644 --- a/packages/pl-fe/src/components/status-media.tsx +++ b/packages/pl-fe/src/components/status-media.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/status-reactions-bar.tsx b/packages/pl-fe/src/components/status-reactions-bar.tsx index 0ea0c08e0..ee93b904e 100644 --- a/packages/pl-fe/src/components/status-reactions-bar.tsx +++ b/packages/pl-fe/src/components/status-reactions-bar.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/status-reply-mentions.tsx b/packages/pl-fe/src/components/status-reply-mentions.tsx index c1f3469bb..ed729ab8c 100644 --- a/packages/pl-fe/src/components/status-reply-mentions.tsx +++ b/packages/pl-fe/src/components/status-reply-mentions.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/status.tsx b/packages/pl-fe/src/components/status.tsx index fa25d7c7d..bea427377 100644 --- a/packages/pl-fe/src/components/status.tsx +++ b/packages/pl-fe/src/components/status.tsx @@ -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'; diff --git a/packages/pl-fe/src/components/thumb-navigation.tsx b/packages/pl-fe/src/components/thumb-navigation.tsx index 6b4f50f24..6369ccf42 100644 --- a/packages/pl-fe/src/components/thumb-navigation.tsx +++ b/packages/pl-fe/src/components/thumb-navigation.tsx @@ -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({ diff --git a/packages/pl-fe/src/components/upload.tsx b/packages/pl-fe/src/components/upload.tsx index f3d12064c..d1bf9c763 100644 --- a/packages/pl-fe/src/components/upload.tsx +++ b/packages/pl-fe/src/components/upload.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/account-gallery/index.tsx b/packages/pl-fe/src/features/account-gallery/index.tsx index a07692702..9bf5865ac 100644 --- a/packages/pl-fe/src/features/account-gallery/index.tsx +++ b/packages/pl-fe/src/features/account-gallery/index.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/account/components/header.tsx b/packages/pl-fe/src/features/account/components/header.tsx index 51bfdf53a..5ec462f1f 100644 --- a/packages/pl-fe/src/features/account/components/header.tsx +++ b/packages/pl-fe/src/features/account/components/header.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/admin/announcements.tsx b/packages/pl-fe/src/features/admin/announcements.tsx index 7ee112603..39f31fc05 100644 --- a/packages/pl-fe/src/features/admin/announcements.tsx +++ b/packages/pl-fe/src/features/admin/announcements.tsx @@ -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({ diff --git a/packages/pl-fe/src/features/admin/domains.tsx b/packages/pl-fe/src/features/admin/domains.tsx index b587b5856..4d8921ee4 100644 --- a/packages/pl-fe/src/features/admin/domains.tsx +++ b/packages/pl-fe/src/features/admin/domains.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/admin/rules.tsx b/packages/pl-fe/src/features/admin/rules.tsx index e516fbb3b..c1273dbb7 100644 --- a/packages/pl-fe/src/features/admin/rules.tsx +++ b/packages/pl-fe/src/features/admin/rules.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/auth-login/components/login-page.tsx b/packages/pl-fe/src/features/auth-login/components/login-page.tsx index 039ef3bc6..3403c8ae7 100644 --- a/packages/pl-fe/src/features/auth-login/components/login-page.tsx +++ b/packages/pl-fe/src/features/auth-login/components/login-page.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/auth-login/components/registration-form.tsx b/packages/pl-fe/src/features/auth-login/components/registration-form.tsx index 0fc982c7c..93585ec31 100644 --- a/packages/pl-fe/src/features/auth-login/components/registration-form.tsx +++ b/packages/pl-fe/src/features/auth-login/components/registration-form.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/auth-token-list/index.tsx b/packages/pl-fe/src/features/auth-token-list/index.tsx index 8bdf014cb..0b6e9c1d6 100644 --- a/packages/pl-fe/src/features/auth-token-list/index.tsx +++ b/packages/pl-fe/src/features/auth-token-list/index.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/bookmarks/index.tsx b/packages/pl-fe/src/features/bookmarks/index.tsx index 1df33861e..6cfa9f275 100644 --- a/packages/pl-fe/src/features/bookmarks/index.tsx +++ b/packages/pl-fe/src/features/bookmarks/index.tsx @@ -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({ diff --git a/packages/pl-fe/src/features/chats/components/chat-composer.tsx b/packages/pl-fe/src/features/chats/components/chat-composer.tsx index eacef2e61..c8a807b16 100644 --- a/packages/pl-fe/src/features/chats/components/chat-composer.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-composer.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/chats/components/chat-list-item.tsx b/packages/pl-fe/src/features/chats/components/chat-list-item.tsx index 802b8a06e..8f353c24e 100644 --- a/packages/pl-fe/src/features/chats/components/chat-list-item.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-list-item.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/chats/components/chat-message.tsx b/packages/pl-fe/src/features/chats/components/chat-message.tsx index c022a8a57..92c192520 100644 --- a/packages/pl-fe/src/features/chats/components/chat-message.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-message.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-main.tsx b/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-main.tsx index e4c57bc4a..46694ac57 100644 --- a/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-main.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-main.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/chats/components/chat-upload.tsx b/packages/pl-fe/src/features/chats/components/chat-upload.tsx index 65a3c3b04..d83c18734 100644 --- a/packages/pl-fe/src/features/chats/components/chat-upload.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-upload.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/chats/components/chat-widget/chat-settings.tsx b/packages/pl-fe/src/features/chats/components/chat-widget/chat-settings.tsx index c55e3efd4..d77c730b7 100644 --- a/packages/pl-fe/src/features/chats/components/chat-widget/chat-settings.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-widget/chat-settings.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/circle/index.tsx b/packages/pl-fe/src/features/circle/index.tsx index 5fd1fac9f..e8d10dc66 100644 --- a/packages/pl-fe/src/features/circle/index.tsx +++ b/packages/pl-fe/src/features/circle/index.tsx @@ -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); diff --git a/packages/pl-fe/src/features/compose/components/reply-mentions.tsx b/packages/pl-fe/src/features/compose/components/reply-mentions.tsx index 7c233b25a..7187096c7 100644 --- a/packages/pl-fe/src/features/compose/components/reply-mentions.tsx +++ b/packages/pl-fe/src/features/compose/components/reply-mentions.tsx @@ -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; diff --git a/packages/pl-fe/src/features/compose/editor/nodes/image-component.tsx b/packages/pl-fe/src/features/compose/editor/nodes/image-component.tsx index 4b655c5bd..6aed51934 100644 --- a/packages/pl-fe/src/features/compose/editor/nodes/image-component.tsx +++ b/packages/pl-fe/src/features/compose/editor/nodes/image-component.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/crypto-donate/components/crypto-address.tsx b/packages/pl-fe/src/features/crypto-donate/components/crypto-address.tsx index cc2b2809f..cf17f32f9 100644 --- a/packages/pl-fe/src/features/crypto-donate/components/crypto-address.tsx +++ b/packages/pl-fe/src/features/crypto-donate/components/crypto-address.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/developers/index.tsx b/packages/pl-fe/src/features/developers/index.tsx index 205c2e192..0d436c683 100644 --- a/packages/pl-fe/src/features/developers/index.tsx +++ b/packages/pl-fe/src/features/developers/index.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/developers/settings-store.tsx b/packages/pl-fe/src/features/developers/settings-store.tsx index 52ab489e1..6dfaaceb8 100644 --- a/packages/pl-fe/src/features/developers/settings-store.tsx +++ b/packages/pl-fe/src/features/developers/settings-store.tsx @@ -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 => { diff --git a/packages/pl-fe/src/features/directory/components/account-card.tsx b/packages/pl-fe/src/features/directory/components/account-card.tsx index 518d24b0e..4a5317e0c 100644 --- a/packages/pl-fe/src/features/directory/components/account-card.tsx +++ b/packages/pl-fe/src/features/directory/components/account-card.tsx @@ -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 { diff --git a/packages/pl-fe/src/features/draft-statuses/components/draft-status-action-bar.tsx b/packages/pl-fe/src/features/draft-statuses/components/draft-status-action-bar.tsx index 9e005dabf..124e5b589 100644 --- a/packages/pl-fe/src/features/draft-statuses/components/draft-status-action-bar.tsx +++ b/packages/pl-fe/src/features/draft-statuses/components/draft-status-action-bar.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/edit-profile/components/avatar-picker.tsx b/packages/pl-fe/src/features/edit-profile/components/avatar-picker.tsx index f2b9bf1e3..e95f26e8d 100644 --- a/packages/pl-fe/src/features/edit-profile/components/avatar-picker.tsx +++ b/packages/pl-fe/src/features/edit-profile/components/avatar-picker.tsx @@ -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' }, diff --git a/packages/pl-fe/src/features/edit-profile/components/header-picker.tsx b/packages/pl-fe/src/features/edit-profile/components/header-picker.tsx index d91769d0e..cc0586d4f 100644 --- a/packages/pl-fe/src/features/edit-profile/components/header-picker.tsx +++ b/packages/pl-fe/src/features/edit-profile/components/header-picker.tsx @@ -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' }, diff --git a/packages/pl-fe/src/features/event/components/event-action-button.tsx b/packages/pl-fe/src/features/event/components/event-action-button.tsx index 68b4568f8..2c923a86f 100644 --- a/packages/pl-fe/src/features/event/components/event-action-button.tsx +++ b/packages/pl-fe/src/features/event/components/event-action-button.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/event/components/event-header.tsx b/packages/pl-fe/src/features/event/components/event-header.tsx index 8d2209827..32880a1f6 100644 --- a/packages/pl-fe/src/features/event/components/event-header.tsx +++ b/packages/pl-fe/src/features/event/components/event-header.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/event/event-information.tsx b/packages/pl-fe/src/features/event/event-information.tsx index 7c8278941..80d5b51c8 100644 --- a/packages/pl-fe/src/features/event/event-information.tsx +++ b/packages/pl-fe/src/features/event/event-information.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/events/index.tsx b/packages/pl-fe/src/features/events/index.tsx index c1d3ff83d..3c89d22e6 100644 --- a/packages/pl-fe/src/features/events/index.tsx +++ b/packages/pl-fe/src/features/events/index.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/group/components/group-action-button.tsx b/packages/pl-fe/src/features/group/components/group-action-button.tsx index a38bed3c3..b88097893 100644 --- a/packages/pl-fe/src/features/group/components/group-action-button.tsx +++ b/packages/pl-fe/src/features/group/components/group-action-button.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/group/components/group-header.tsx b/packages/pl-fe/src/features/group/components/group-header.tsx index af6c6719d..bc41198db 100644 --- a/packages/pl-fe/src/features/group/components/group-header.tsx +++ b/packages/pl-fe/src/features/group/components/group-header.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/group/components/group-member-list-item.tsx b/packages/pl-fe/src/features/group/components/group-member-list-item.tsx index d43fc4ebd..dee56f614 100644 --- a/packages/pl-fe/src/features/group/components/group-member-list-item.tsx +++ b/packages/pl-fe/src/features/group/components/group-member-list-item.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/group/components/group-options-button.tsx b/packages/pl-fe/src/features/group/components/group-options-button.tsx index 5b73cd78b..0e39f736b 100644 --- a/packages/pl-fe/src/features/group/components/group-options-button.tsx +++ b/packages/pl-fe/src/features/group/components/group-options-button.tsx @@ -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({ diff --git a/packages/pl-fe/src/features/group/group-gallery.tsx b/packages/pl-fe/src/features/group/group-gallery.tsx index e094fc424..9ba3a613d 100644 --- a/packages/pl-fe/src/features/group/group-gallery.tsx +++ b/packages/pl-fe/src/features/group/group-gallery.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/group/manage-group.tsx b/packages/pl-fe/src/features/group/manage-group.tsx index 8d6fc27bb..517780e92 100644 --- a/packages/pl-fe/src/features/group/manage-group.tsx +++ b/packages/pl-fe/src/features/group/manage-group.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/groups/index.tsx b/packages/pl-fe/src/features/groups/index.tsx index 696d44dbb..d6efef75d 100644 --- a/packages/pl-fe/src/features/groups/index.tsx +++ b/packages/pl-fe/src/features/groups/index.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/list-timeline/index.tsx b/packages/pl-fe/src/features/list-timeline/index.tsx index 1a1e412a8..93e083529 100644 --- a/packages/pl-fe/src/features/list-timeline/index.tsx +++ b/packages/pl-fe/src/features/list-timeline/index.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/new-status/index.tsx b/packages/pl-fe/src/features/new-status/index.tsx index e5408c3e1..b90176fd5 100644 --- a/packages/pl-fe/src/features/new-status/index.tsx +++ b/packages/pl-fe/src/features/new-status/index.tsx @@ -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(); diff --git a/packages/pl-fe/src/features/notifications/components/notification.tsx b/packages/pl-fe/src/features/notifications/components/notification.tsx index 426443302..bc5351f12 100644 --- a/packages/pl-fe/src/features/notifications/components/notification.tsx +++ b/packages/pl-fe/src/features/notifications/components/notification.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/pl-fe-config/components/site-preview.tsx b/packages/pl-fe/src/features/pl-fe-config/components/site-preview.tsx index 664244eed..ffd4e40de 100644 --- a/packages/pl-fe/src/features/pl-fe-config/components/site-preview.tsx +++ b/packages/pl-fe/src/features/pl-fe-config/components/site-preview.tsx @@ -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 { diff --git a/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status-action-bar.tsx b/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status-action-bar.tsx index 8d1c44f48..44b9e304a 100644 --- a/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status-action-bar.tsx +++ b/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status-action-bar.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/status/components/status-interaction-bar.tsx b/packages/pl-fe/src/features/status/components/status-interaction-bar.tsx index 1770ec3c9..8d8ce3109 100644 --- a/packages/pl-fe/src/features/status/components/status-interaction-bar.tsx +++ b/packages/pl-fe/src/features/status/components/status-interaction-bar.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/status/components/thread.tsx b/packages/pl-fe/src/features/status/components/thread.tsx index 30fa8b503..146c8b169 100644 --- a/packages/pl-fe/src/features/status/components/thread.tsx +++ b/packages/pl-fe/src/features/status/components/thread.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/ui/components/action-button.tsx b/packages/pl-fe/src/features/ui/components/action-button.tsx index 10ffc5b84..d5a715074 100644 --- a/packages/pl-fe/src/features/ui/components/action-button.tsx +++ b/packages/pl-fe/src/features/ui/components/action-button.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/ui/components/compose-button.tsx b/packages/pl-fe/src/features/ui/components/compose-button.tsx index f06887989..f50380206 100644 --- a/packages/pl-fe/src/features/ui/components/compose-button.tsx +++ b/packages/pl-fe/src/features/ui/components/compose-button.tsx @@ -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(); diff --git a/packages/pl-fe/src/features/ui/components/floating-action-button.tsx b/packages/pl-fe/src/features/ui/components/floating-action-button.tsx index f8069426e..8e85d991f 100644 --- a/packages/pl-fe/src/features/ui/components/floating-action-button.tsx +++ b/packages/pl-fe/src/features/ui/components/floating-action-button.tsx @@ -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' }, diff --git a/packages/pl-fe/src/features/ui/components/modal-root.tsx b/packages/pl-fe/src/features/ui/components/modal-root.tsx index a1b1da7e3..29b18c225 100644 --- a/packages/pl-fe/src/features/ui/components/modal-root.tsx +++ b/packages/pl-fe/src/features/ui/components/modal-root.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/index.tsx b/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/index.tsx index 82fb281ca..db1c4d7d8 100644 --- a/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/index.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/index.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/ui/components/modals/compose-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/compose-modal.tsx index ea55d247d..ae5ccb45c 100644 --- a/packages/pl-fe/src/features/ui/components/modals/compose-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/compose-modal.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/ui/components/panels/group-media-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/group-media-panel.tsx index 008a9a60f..7f92983d3 100644 --- a/packages/pl-fe/src/features/ui/components/panels/group-media-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/group-media-panel.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/ui/components/panels/instance-moderation-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/instance-moderation-panel.tsx index 8bc34469d..ef119a0a6 100644 --- a/packages/pl-fe/src/features/ui/components/panels/instance-moderation-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/instance-moderation-panel.tsx @@ -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(); diff --git a/packages/pl-fe/src/features/ui/components/panels/new-event-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/new-event-panel.tsx index 9a0919d38..d94c2db9e 100644 --- a/packages/pl-fe/src/features/ui/components/panels/new-event-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/new-event-panel.tsx @@ -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(); diff --git a/packages/pl-fe/src/features/ui/components/panels/new-group-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/new-group-panel.tsx index d8d46a84f..7cfbf3c3e 100644 --- a/packages/pl-fe/src/features/ui/components/panels/new-group-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/new-group-panel.tsx @@ -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(); diff --git a/packages/pl-fe/src/features/ui/components/panels/profile-media-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/profile-media-panel.tsx index a545f993b..3d823561d 100644 --- a/packages/pl-fe/src/features/ui/components/panels/profile-media-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/profile-media-panel.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/ui/components/profile-familiar-followers.tsx b/packages/pl-fe/src/features/ui/components/profile-familiar-followers.tsx index 2ef2004d0..cd045eb9c 100644 --- a/packages/pl-fe/src/features/ui/components/profile-familiar-followers.tsx +++ b/packages/pl-fe/src/features/ui/components/profile-familiar-followers.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/ui/index.tsx b/packages/pl-fe/src/features/ui/index.tsx index ccf813030..87a45eb62 100644 --- a/packages/pl-fe/src/features/ui/index.tsx +++ b/packages/pl-fe/src/features/ui/index.tsx @@ -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'; diff --git a/packages/pl-fe/src/features/ui/util/global-hotkeys.tsx b/packages/pl-fe/src/features/ui/util/global-hotkeys.tsx index 845651996..36d8dc148 100644 --- a/packages/pl-fe/src/features/ui/util/global-hotkeys.tsx +++ b/packages/pl-fe/src/features/ui/util/global-hotkeys.tsx @@ -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'; diff --git a/packages/pl-fe/src/hooks/useSettings.ts b/packages/pl-fe/src/hooks/useSettings.ts index 39b0f06a2..b05b569e8 100644 --- a/packages/pl-fe/src/hooks/useSettings.ts +++ b/packages/pl-fe/src/hooks/useSettings.ts @@ -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; diff --git a/packages/pl-fe/src/init/pl-fe-head.tsx b/packages/pl-fe/src/init/pl-fe-head.tsx index 0eea82519..c057a579c 100644 --- a/packages/pl-fe/src/init/pl-fe-head.tsx +++ b/packages/pl-fe/src/init/pl-fe-head.tsx @@ -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')); diff --git a/packages/pl-fe/src/selectors/index.ts b/packages/pl-fe/src/selectors/index.ts index e05d53b12..4b42e0ea0 100644 --- a/packages/pl-fe/src/selectors/index.ts +++ b/packages/pl-fe/src/selectors/index.ts @@ -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'; diff --git a/packages/pl-fe/src/stores/index.ts b/packages/pl-fe/src/stores/index.ts deleted file mode 100644 index 83ae3dfd5..000000000 --- a/packages/pl-fe/src/stores/index.ts +++ /dev/null @@ -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';