pl-fe: Add settings store to a barrel export
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
99b1b6991f
commit
1df5921cb7
24 changed files with 24 additions and 31 deletions
|
@ -1,5 +1,5 @@
|
|||
import { changeSetting } from 'pl-fe/actions/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
|
||||
import type { AppDispatch, RootState } from 'pl-fe/store';
|
||||
|
||||
|
|
|
@ -7,8 +7,7 @@ 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 } from 'pl-fe/stores';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
|
||||
import toast from 'pl-fe/toast';
|
||||
import { isLoggedIn } from 'pl-fe/utils/auth';
|
||||
|
||||
|
|
|
@ -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/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
import { getAuthUserId, getAuthUserUrl } from 'pl-fe/utils/auth';
|
||||
|
||||
import { getClient } from '../api';
|
||||
|
|
|
@ -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/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
import { isLoggedIn } from 'pl-fe/utils/auth';
|
||||
import { compareId } from 'pl-fe/utils/comparators';
|
||||
import { unescapeHTML } from 'pl-fe/utils/html';
|
||||
|
|
|
@ -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/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
|
||||
import { getClient, staticFetch } from '../api';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { changeSetting } from 'pl-fe/actions/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
|
||||
import type { AppDispatch, RootState } from 'pl-fe/store';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
|
||||
import { getClient } from '../api';
|
||||
|
||||
|
|
|
@ -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/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
import toast from 'pl-fe/toast';
|
||||
import { isLoggedIn } from 'pl-fe/utils/auth';
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { useModalsStore } from 'pl-fe/stores';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
|
||||
import { isLoggedIn } from 'pl-fe/utils/auth';
|
||||
import { shouldHaveCard } from 'pl-fe/utils/status';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import { getLocale } from 'pl-fe/actions/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
import { shouldFilter } from 'pl-fe/utils/timelines';
|
||||
|
||||
import { getClient } from '../api';
|
||||
|
|
|
@ -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/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
import { getUnreadChatsCount, updateChatListItem } from 'pl-fe/utils/chats';
|
||||
import { play, soundCache } from 'pl-fe/utils/sounds';
|
||||
|
||||
|
|
|
@ -11,8 +11,7 @@ import { Stack, Divider, HStack, Icon, Text } from 'pl-fe/components/ui';
|
|||
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 } from 'pl-fe/stores';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useUiStore, useSettingsStore } from 'pl-fe/stores';
|
||||
import sourceCode from 'pl-fe/utils/code';
|
||||
|
||||
import type { List as ImmutableList } from 'immutable';
|
||||
|
|
|
@ -22,8 +22,7 @@ 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 } from 'pl-fe/stores';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
|
||||
import toast from 'pl-fe/toast';
|
||||
import { isDefaultHeader } from 'pl-fe/utils/accounts';
|
||||
import copy from 'pl-fe/utils/copy';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
|
||||
import DevelopersChallenge from './developers-challenge';
|
||||
import DevelopersMenu from './developers-menu';
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
} from 'pl-fe/components/ui';
|
||||
import SettingToggle from 'pl-fe/features/notifications/components/setting-toggle';
|
||||
import { useAppDispatch } from 'pl-fe/hooks';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
import toast from 'pl-fe/toast';
|
||||
|
||||
const isJSONValid = (text: any): boolean => {
|
||||
|
|
|
@ -11,7 +11,7 @@ import RelativeTimestamp from 'pl-fe/components/relative-timestamp';
|
|||
import { Avatar, Stack, Text } from 'pl-fe/components/ui';
|
||||
import ActionButton from 'pl-fe/features/ui/components/action-button';
|
||||
import { useAppSelector } from 'pl-fe/hooks';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
import { shortNumberFormat } from 'pl-fe/utils/numbers';
|
||||
|
||||
interface IAccountCard {
|
||||
|
|
|
@ -5,8 +5,7 @@ import { setComposeToStatus } from 'pl-fe/actions/compose';
|
|||
import { cancelDraftStatus } from 'pl-fe/actions/draft-statuses';
|
||||
import { Button, HStack } from 'pl-fe/components/ui';
|
||||
import { useAppDispatch } from 'pl-fe/hooks';
|
||||
import { useModalsStore } from 'pl-fe/stores';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
|
||||
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { DraftStatus } from 'pl-fe/reducers/draft-statuses';
|
||||
|
|
|
@ -14,8 +14,7 @@ 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 } from 'pl-fe/stores';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
|
||||
import { NotificationType } from 'pl-fe/utils/notification';
|
||||
|
||||
import type { Notification as BaseNotification } from 'pl-api';
|
||||
|
|
|
@ -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/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
import { generateThemeCss } from 'pl-fe/utils/theme';
|
||||
|
||||
interface ISitePreview {
|
||||
|
|
|
@ -4,8 +4,7 @@ import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
|
|||
import { cancelScheduledStatus } from 'pl-fe/actions/scheduled-statuses';
|
||||
import { Button, HStack } from 'pl-fe/components/ui';
|
||||
import { useAppDispatch } from 'pl-fe/hooks';
|
||||
import { useModalsStore } from 'pl-fe/stores';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
|
||||
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
|
||||
|
|
|
@ -18,8 +18,7 @@ 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 } from 'pl-fe/stores';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useModalsStore, useSettingsStore } from 'pl-fe/stores';
|
||||
import { textForScreenReader } from 'pl-fe/utils/status';
|
||||
|
||||
import DetailedStatus from './detailed-status';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
|
||||
/** Get the user settings from the store */
|
||||
const useSettings = () => useSettingsStore().settings;
|
||||
|
|
|
@ -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/settings';
|
||||
import { useSettingsStore } from 'pl-fe/stores';
|
||||
import { getDomain } from 'pl-fe/utils/accounts';
|
||||
import { validId } from 'pl-fe/utils/auth';
|
||||
import ConfigDB from 'pl-fe/utils/config-db';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export { useAccountHoverCardStore } from './account-hover-card';
|
||||
export { useModalsStore } from './modals';
|
||||
export { useSettingsStore } from './settings';
|
||||
export { useStatusHoverCardStore } from './status-hover-card';
|
||||
export { useUiStore } from './ui';
|
||||
|
|
Loading…
Reference in a new issue