pl-fe: Remove more barrel exports

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-10-20 01:10:05 +02:00
parent bbbf6563c5
commit 512a28eafd
116 changed files with 335 additions and 152 deletions

View file

@ -3,7 +3,7 @@ import { Map as ImmutableMap } from 'immutable';
import { __stub } from 'pl-fe/api';
import { buildInstance, buildRelationship } from 'pl-fe/jest/factory';
import { mockStore, rootState } from 'pl-fe/jest/test-helpers';
import { normalizeAccount } from 'pl-fe/normalizers';
import { normalizeAccount } from 'pl-fe/normalizers/account';
import { ListRecord, ReducerRecord } from 'pl-fe/reducers/user-lists';
import {

View file

@ -1,7 +1,7 @@
import { defineMessages } from 'react-intl';
import { getClient } from 'pl-fe/api';
import { normalizeAccount } from 'pl-fe/normalizers';
import { normalizeAccount } from 'pl-fe/normalizers/account';
import toast from 'pl-fe/toast';
import type { Account, PaginatedResponse } from 'pl-api';

View file

@ -1,6 +1,7 @@
import { importEntities } from 'pl-fe/entity-store/actions';
import { Entities } from 'pl-fe/entity-store/entities';
import { normalizeAccount, normalizeGroup } from 'pl-fe/normalizers';
import { normalizeAccount } from 'pl-fe/normalizers/account';
import { normalizeGroup } from 'pl-fe/normalizers/group';
import type { Account as BaseAccount, Group, Poll, Status as BaseStatus } from 'pl-api';
import type { AppDispatch } from 'pl-fe/store';

View file

@ -7,7 +7,7 @@ import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useClient } from 'pl-fe/hooks/useClient';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
import { type Account, normalizeAccount } from 'pl-fe/normalizers';
import { type Account, normalizeAccount } from 'pl-fe/normalizers/account';
import { useAccountScrobble } from './useAccountScrobble';
import { useRelationship } from './useRelationship';

View file

@ -2,7 +2,7 @@ import { useInfiniteQuery } from '@tanstack/react-query';
import { Entities } from 'pl-fe/entity-store/entities';
import { useClient } from 'pl-fe/hooks/useClient';
import { type Account, normalizeAccount } from 'pl-fe/normalizers';
import { type Account, normalizeAccount } from 'pl-fe/normalizers/account';
import { flattenPages } from 'pl-fe/utils/queries';
import { useRelationships } from './useRelationships';

View file

@ -6,7 +6,7 @@ import { useEntityLookup } from 'pl-fe/entity-store/hooks/useEntityLookup';
import { useClient } from 'pl-fe/hooks/useClient';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
import { type Account, normalizeAccount } from 'pl-fe/normalizers';
import { type Account, normalizeAccount } from 'pl-fe/normalizers/account';
import { useAccountScrobble } from './useAccountScrobble';
import { useRelationship } from './useRelationship';

View file

@ -8,7 +8,7 @@ import {
import * as v from 'valibot';
import { useClient } from 'pl-fe/hooks/useClient';
import { normalizeAnnouncement, AdminAnnouncement } from 'pl-fe/normalizers';
import { normalizeAnnouncement, AdminAnnouncement } from 'pl-fe/normalizers/announcement';
import { queryClient } from 'pl-fe/queries/client';
import { useAnnouncements as useUserAnnouncements } from '../announcements/useAnnouncements';

View file

@ -3,7 +3,7 @@ import { announcementReactionSchema, type AnnouncementReaction } from 'pl-api';
import * as v from 'valibot';
import { useClient } from 'pl-fe/hooks/useClient';
import { type Announcement, normalizeAnnouncement } from 'pl-fe/normalizers';
import { type Announcement, normalizeAnnouncement } from 'pl-fe/normalizers/announcement';
import { queryClient } from 'pl-fe/queries/client';
const updateReaction = (reaction: AnnouncementReaction, count: number, me?: boolean, overwrite?: boolean) => v.parse(announcementReactionSchema, {

View file

@ -4,7 +4,7 @@ import { Entities } from 'pl-fe/entity-store/entities';
import { useDismissEntity } from 'pl-fe/entity-store/hooks/useDismissEntity';
import { useEntities } from 'pl-fe/entity-store/hooks/useEntities';
import { useClient } from 'pl-fe/hooks/useClient';
import { normalizeAccount } from 'pl-fe/normalizers';
import { normalizeAccount } from 'pl-fe/normalizers/account';
import { useGroupRelationship } from './useGroupRelationship';

View file

@ -3,7 +3,8 @@ import { defineMessages, useIntl } from 'react-intl';
import IconButton from 'pl-fe/components/icon-button';
import { DatePicker } from 'pl-fe/features/ui/util/async-components';
import { useInstance, useFeatures } from 'pl-fe/hooks';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
const messages = defineMessages({
birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birthday' },

View file

@ -7,7 +7,8 @@ import Button from 'pl-fe/components/ui/button';
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 { useInstance, usePlFeConfig } from 'pl-fe/hooks';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
const acceptedGdpr = !!localStorage.getItem('plfe:gdpr');

View file

@ -2,7 +2,9 @@ import React from 'react';
import { Helmet as ReactHelmet } from 'react-helmet-async';
import { useStatContext } from 'pl-fe/contexts/stat-context';
import { useAppSelector, useInstance, useSettings } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { RootState } from 'pl-fe/store';
import FaviconService from 'pl-fe/utils/favicon-service';

View file

@ -6,7 +6,8 @@ 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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { usePrevious } from 'pl-fe/hooks/usePrevious';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { ModalType } from 'pl-fe/features/ui/components/modal-root';

View file

@ -1,7 +1,8 @@
import React from 'react';
import { render, screen, rootState } from 'pl-fe/jest/test-helpers';
import { normalizeStatus, normalizeAccount } from 'pl-fe/normalizers';
import { normalizeAccount } from 'pl-fe/normalizers/account';
import { normalizeStatus } from 'pl-fe/normalizers/status';
import QuotedStatus from './quoted-status';

View file

@ -13,7 +13,11 @@ 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 ProfileStats from 'pl-fe/features/ui/components/profile-stats';
import { useAppDispatch, useAppSelector, useFeatures, useInstance, useRegistrationStatus } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus';
import { makeGetOtherAccounts } from 'pl-fe/selectors';
import { useSettingsStore } from 'pl-fe/stores/settings';
import { useUiStore } from 'pl-fe/stores/ui';

View file

@ -7,7 +7,13 @@ import { useStatContext } from 'pl-fe/contexts/stat-context';
import Search from 'pl-fe/features/search/components/search';
import ComposeButton from 'pl-fe/features/ui/components/compose-button';
import ProfileDropdown from 'pl-fe/features/ui/components/profile-dropdown';
import { useAppSelector, useFeatures, useOwnAccount, useSettings, useInstance, useRegistrationStatus, useLogo } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus';
import { useLogo } from 'pl-fe/hooks/useLogo';
import Account from './account';
import DropdownMenu, { Menu } from './dropdown-menu';

View file

@ -7,7 +7,8 @@ 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 Textarea from 'pl-fe/components/ui/textarea';
import { useLogo, usePlFeConfig } from 'pl-fe/hooks';
import { useLogo } from 'pl-fe/hooks/useLogo';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
import { captureSentryException } from 'pl-fe/sentry';
import KVStore from 'pl-fe/storage/kv-store';
import sourceCode from 'pl-fe/utils/code';

View file

@ -24,7 +24,12 @@ import StatusActionButton from 'pl-fe/components/status-action-button';
import HStack from 'pl-fe/components/ui/hstack';
import EmojiPickerDropdown from 'pl-fe/features/emoji/containers/emoji-picker-dropdown-container';
import { languages } from 'pl-fe/features/preferences';
import { useAppDispatch, useAppSelector, useFeatures, useInstance, useOwnAccount, useSettings } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useChats } from 'pl-fe/queries/chats';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';

View file

@ -10,7 +10,10 @@ import Icon from 'pl-fe/components/ui/icon';
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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useModalsStore } from 'pl-fe/stores/modals';
import AnimatedNumber from './animated-number';

View file

@ -7,7 +7,10 @@ import ThumbNavigationLink from 'pl-fe/components/thumb-navigation-link';
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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useUiStore } from 'pl-fe/stores/ui';
import { isStandalone } from 'pl-fe/utils/state';

View file

@ -7,7 +7,11 @@ 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 { useAppDispatch, useAppSelector, useFeatures, useInstance, useSettings } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useSettings } from 'pl-fe/hooks/useSettings';
import type { Status } from 'pl-fe/normalizers/status';

View file

@ -5,7 +5,9 @@ import { useParams } from 'react-router-dom';
import { fetchAboutPage } from 'pl-fe/actions/about';
import { Navlinks } from 'pl-fe/components/navlinks';
import Card from 'pl-fe/components/ui/card';
import { usePlFeConfig, useSettings, useAppDispatch } from 'pl-fe/hooks';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { languages } from '../preferences';

View file

@ -10,7 +10,10 @@ import StatusList from 'pl-fe/components/status-list';
import Card, { CardBody } from 'pl-fe/components/ui/card';
import Spinner from 'pl-fe/components/ui/spinner';
import Text from 'pl-fe/components/ui/text';
import { useAppDispatch, useAppSelector, useFeatures, useSettings } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { makeGetStatusIds } from 'pl-fe/selectors';
const getStatusIds = makeGetStatusIds();

View file

@ -22,7 +22,10 @@ import VerificationBadge from 'pl-fe/components/verification-badge';
import MovedNote from 'pl-fe/features/account-timeline/components/moved-note';
import ActionButton from 'pl-fe/features/ui/components/action-button';
import SubscriptionButton from 'pl-fe/features/ui/components/subscription-button';
import { useAppDispatch, useAppSelector, useFeatures, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useChats } from 'pl-fe/queries/chats';
import { queryClient } from 'pl-fe/queries/client';
import { useModalsStore } from 'pl-fe/stores/modals';

View file

@ -5,7 +5,9 @@ import List, { ListItem } from 'pl-fe/components/list';
import { CardTitle } from 'pl-fe/components/ui/card';
import Icon from 'pl-fe/components/ui/icon';
import Stack from 'pl-fe/components/ui/stack';
import { useOwnAccount, useFeatures, useInstance } from 'pl-fe/hooks';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import sourceCode from 'pl-fe/utils/code';
import { DashCounter, DashCounters } from '../components/dashcounter';

View file

@ -8,7 +8,10 @@ import { 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 Text from 'pl-fe/components/ui/text';
import { useAppDispatch, useAppSelector, useFeatures, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import Account from './components/account';
import Search from './components/search';

View file

@ -9,7 +9,8 @@ import Form from 'pl-fe/components/ui/form';
import FormActions from 'pl-fe/components/ui/form-actions';
import FormGroup from 'pl-fe/components/ui/form-group';
import Input from 'pl-fe/components/ui/input';
import { useAppDispatch, useFeatures } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import toast from 'pl-fe/toast';
const messages = defineMessages({

View file

@ -16,7 +16,10 @@ import Input from 'pl-fe/components/ui/input';
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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useModalsStore } from 'pl-fe/stores/modals';
import type { CreateAccountParams } from 'pl-api';

View file

@ -3,7 +3,8 @@ import { FormattedMessage } from 'react-intl';
import { BigCard } from 'pl-fe/components/big-card';
import Text from 'pl-fe/components/ui/text';
import { useInstance, useRegistrationStatus } from 'pl-fe/hooks';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus';
import RegistrationForm from './registration-form';

View file

@ -11,7 +11,9 @@ import DropdownMenu from 'pl-fe/components/dropdown-menu';
import PullToRefresh from 'pl-fe/components/pull-to-refresh';
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 { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';

View file

@ -4,7 +4,9 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
import { fetchBubbleTimeline } from 'pl-fe/actions/timelines';
import PullToRefresh from 'pl-fe/components/pull-to-refresh';
import Column from 'pl-fe/components/ui/column';
import { useAppDispatch, useSettings, useTheme } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
import Timeline from '../ui/components/timeline';

View file

@ -12,7 +12,9 @@ import IconButton from 'pl-fe/components/ui/icon-button';
import Stack from 'pl-fe/components/ui/stack';
import Toggle from 'pl-fe/components/ui/toggle';
import SettingToggle from 'pl-fe/features/notifications/components/setting-toggle';
import { useAppDispatch, useOwnAccount, useSettings } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useUpdateCredentials } from 'pl-fe/queries/accounts';
type FormData = {

View file

@ -15,7 +15,8 @@ import HStack from 'pl-fe/components/ui/hstack';
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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useModalsStore } from 'pl-fe/stores/modals';
const toRad = (x: number) => x * (Math.PI / 180);

View file

@ -5,7 +5,9 @@ import { fetchPublicTimeline } from 'pl-fe/actions/timelines';
import { useCommunityStream } from 'pl-fe/api/hooks/streaming/useCommunityStream';
import PullToRefresh from 'pl-fe/components/pull-to-refresh';
import Column from 'pl-fe/components/ui/column';
import { useAppDispatch, useSettings, useTheme } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
import Timeline from '../ui/components/timeline';

View file

@ -17,7 +17,12 @@ import HStack from 'pl-fe/components/ui/hstack';
import Stack from 'pl-fe/components/ui/stack';
import EmojiPickerDropdown from 'pl-fe/features/emoji/containers/emoji-picker-dropdown-container';
import { ComposeEditor } from 'pl-fe/features/ui/util/async-components';
import { useAppDispatch, useAppSelector, useCompose, useDraggedFiles, useFeatures, useInstance } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import QuotedStatusContainer from '../containers/quoted-status-container';
import ReplyIndicatorContainer from '../containers/reply-indicator-container';

View file

@ -4,7 +4,9 @@ import { defineMessages, useIntl } from 'react-intl';
import { changeComposeContentType } from 'pl-fe/actions/compose';
import DropdownMenu from 'pl-fe/components/dropdown-menu';
import Button from 'pl-fe/components/ui/button';
import { useAppDispatch, useCompose, useInstance } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { useInstance } from 'pl-fe/hooks/useInstance';
const messages = defineMessages({
content_type_plaintext: { id: 'preferences.options.content_type_plaintext', defaultMessage: 'Plain text' },

View file

@ -9,7 +9,10 @@ import Button from 'pl-fe/components/ui/button';
import Icon from 'pl-fe/components/ui/icon';
import Input from 'pl-fe/components/ui/input';
import { type Language, languages as languagesObject } from 'pl-fe/features/preferences';
import { useAppDispatch, useCompose, useFeatures, useSettings } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useSettings } from 'pl-fe/hooks/useSettings';
const getFrequentlyUsedLanguages = (languageCounters: Record<string, number>) => (
Object.keys(languageCounters)

View file

@ -9,7 +9,9 @@ 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 Toggle from 'pl-fe/components/ui/toggle';
import { useAppDispatch, useCompose, useInstance } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { useInstance } from 'pl-fe/hooks/useInstance';
import DurationSelector from './duration-selector';

View file

@ -6,7 +6,10 @@ import { fetchLists } from 'pl-fe/actions/lists';
import DropdownMenu, { MenuItem } from 'pl-fe/components/dropdown-menu';
import Button from 'pl-fe/components/ui/button';
import { getOrderedLists } from 'pl-fe/features/lists';
import { useAppDispatch, useAppSelector, useCompose, useFeatures } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import type { Features } from 'pl-api';

View file

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

View file

@ -2,7 +2,9 @@ import React, { useCallback } from 'react';
import { undoUploadCompose, changeUploadCompose } from 'pl-fe/actions/compose';
import Upload from 'pl-fe/components/upload';
import { useAppDispatch, useCompose, useInstance } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { useInstance } from 'pl-fe/hooks/useInstance';
interface IUploadCompose {
id: string;

View file

@ -1,7 +1,9 @@
import React, { useCallback } from 'react';
import { cancelReplyCompose } from 'pl-fe/actions/compose';
import { useAppDispatch, useAppSelector, useCompose } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { makeGetStatus } from 'pl-fe/selectors';
import ReplyIndicator from '../components/reply-indicator';

View file

@ -2,7 +2,8 @@ import React from 'react';
import { FormattedMessage } from 'react-intl';
import { Link } from 'react-router-dom';
import { useAppSelector, useCompose } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { selectOwnAccount } from 'pl-fe/selectors';
import Warning from '../components/warning';

View file

@ -7,7 +7,8 @@ import { useIntl } from 'react-intl';
import { addSuggestedLanguage, addSuggestedQuote, setEditorState } from 'pl-fe/actions/compose';
import { fetchStatus } from 'pl-fe/actions/statuses';
import { useAppDispatch, useFeatures } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { getStatusIdsFromLinksInContent } from 'pl-fe/utils/status';
import type { LanguageIdentificationModel } from 'fasttext.wasm.js/dist/models/language-identification/common.js';

View file

@ -4,7 +4,8 @@ import { useHistory } from 'react-router-dom';
import Text from 'pl-fe/components/ui/text';
import Widget from 'pl-fe/components/ui/widget';
import { useInstance, usePlFeConfig } from 'pl-fe/hooks';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
import SiteWallet from './site-wallet';

View file

@ -10,7 +10,8 @@ import FormGroup from 'pl-fe/components/ui/form-group';
import Input from 'pl-fe/components/ui/input';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useAppDispatch, useFeatures } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import toast from 'pl-fe/toast';
const messages = defineMessages({

View file

@ -12,7 +12,8 @@ import Input from 'pl-fe/components/ui/input';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import Textarea from 'pl-fe/components/ui/textarea';
import { useAppDispatch, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { getBaseURL } from 'pl-fe/utils/accounts';
import type { Token } from 'pl-api';

View file

@ -9,7 +9,10 @@ import { RadioGroup, RadioItem } from 'pl-fe/components/radio';
import { CardTitle } from 'pl-fe/components/ui/card';
import Column from 'pl-fe/components/ui/column';
import Stack from 'pl-fe/components/ui/stack';
import { useAppDispatch, useAppSelector, useFeatures, useInstance } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import AccountCard from './components/account-card';

View file

@ -17,7 +17,11 @@ import Input from 'pl-fe/components/ui/input';
import Streamfield from 'pl-fe/components/ui/streamfield';
import Textarea from 'pl-fe/components/ui/textarea';
import Toggle from 'pl-fe/components/ui/toggle';
import { useAppDispatch, useOwnAccount, useFeatures, useInstance, useAppSelector } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useImageField } from 'pl-fe/hooks/forms/useImageField';
import toast from 'pl-fe/toast';
import { isDefaultAvatar, isDefaultHeader } from 'pl-fe/utils/accounts';

View file

@ -7,7 +7,9 @@ import MissingIndicator from 'pl-fe/components/missing-indicator';
import SiteLogo from 'pl-fe/components/site-logo';
import Status from 'pl-fe/components/status';
import Spinner from 'pl-fe/components/ui/spinner';
import { useAppDispatch, useAppSelector, useLogo } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useLogo } from 'pl-fe/hooks/useLogo';
import { iframeId } from 'pl-fe/iframe';
import { makeGetStatus } from 'pl-fe/selectors';

View file

@ -4,7 +4,10 @@ import { createSelector } from 'reselect';
import { chooseEmoji } from 'pl-fe/actions/emojis';
import { changeSetting } from 'pl-fe/actions/settings';
import { useAppDispatch, useAppSelector, useSettings, useTheme } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { RootState } from 'pl-fe/store';
import { buildCustomEmojis } from '../../emoji';

View file

@ -19,7 +19,10 @@ import IconButton from 'pl-fe/components/ui/icon-button';
import Stack from 'pl-fe/components/ui/stack';
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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useChats } from 'pl-fe/queries/chats';
import { useModalsStore } from 'pl-fe/stores/modals';
import copy from 'pl-fe/utils/copy';

View file

@ -11,7 +11,9 @@ 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 QuotedStatus from 'pl-fe/features/status/containers/quoted-status-container';
import { useAppDispatch, useAppSelector, usePlFeConfig } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
import { makeGetStatus } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores/modals';

View file

@ -9,7 +9,9 @@ import { useAccountLookup } from 'pl-fe/api/hooks/accounts/useAccountLookup';
import MissingIndicator from 'pl-fe/components/missing-indicator';
import StatusList from 'pl-fe/components/status-list';
import Column from 'pl-fe/components/ui/column';
import { useAppDispatch, useAppSelector, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
const messages = defineMessages({
heading: { id: 'column.favourited_statuses', defaultMessage: 'Liked posts' },

View file

@ -4,7 +4,8 @@ import { defineMessages, useIntl } from 'react-intl';
import ScrollableList from 'pl-fe/components/scrollable-list';
import Accordion from 'pl-fe/components/ui/accordion';
import Column from 'pl-fe/components/ui/column';
import { useAppSelector, useInstance } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { makeGetHosts } from 'pl-fe/selectors';
import { federationRestrictionsDisclosed } from 'pl-fe/utils/state';

View file

@ -16,7 +16,8 @@ import Stack from 'pl-fe/components/ui/stack';
import Streamfield from 'pl-fe/components/ui/streamfield';
import Text from 'pl-fe/components/ui/text';
import Toggle from 'pl-fe/components/ui/toggle';
import { useAppDispatch, useFeatures } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import toast from 'pl-fe/toast';
import { SelectDropdown } from '../forms';

View file

@ -13,7 +13,10 @@ 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 ComposeForm from 'pl-fe/features/compose/components/compose-form';
import { useAppDispatch, useAppSelector, useDraggedFiles, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { makeGetStatusIds } from 'pl-fe/selectors';
import Timeline from '../ui/components/timeline';

View file

@ -8,7 +8,11 @@ import List, { ListItem } from 'pl-fe/components/list';
import Column from 'pl-fe/components/ui/column';
import Toggle from 'pl-fe/components/ui/toggle';
import Timeline from 'pl-fe/features/ui/components/timeline';
import { useAppDispatch, useAppSelector, useFeatures, useLoggedIn, useTheme } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
interface IHashtagTimeline {

View file

@ -8,7 +8,11 @@ import Column from 'pl-fe/components/ui/column';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import Timeline from 'pl-fe/features/ui/components/timeline';
import { useAppSelector, useAppDispatch, useFeatures, useInstance, useTheme } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
const messages = defineMessages({

View file

@ -5,7 +5,9 @@ import { fetchPublicTimeline } from 'pl-fe/actions/timelines';
import { useCommunityStream } from 'pl-fe/api/hooks/streaming/useCommunityStream';
import PullToRefresh from 'pl-fe/components/pull-to-refresh';
import Column from 'pl-fe/components/ui/column';
import { useAppDispatch, useInstance, useTheme } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
import AboutPage from '../about';

View file

@ -10,7 +10,9 @@ import MissingIndicator from 'pl-fe/components/missing-indicator';
import Button from 'pl-fe/components/ui/button';
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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
import { useModalsStore } from 'pl-fe/stores/modals';

View file

@ -4,7 +4,9 @@ import { defineMessages, useIntl } from 'react-intl';
import { type FilterType, setFilter } from 'pl-fe/actions/notifications';
import Icon from 'pl-fe/components/ui/icon';
import Tabs from 'pl-fe/components/ui/tabs';
import { useAppDispatch, useFeatures, useSettings } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useSettings } from 'pl-fe/hooks/useSettings';
import type { Item } from 'pl-fe/components/ui/tabs';

View file

@ -14,7 +14,10 @@ import Text from 'pl-fe/components/ui/text';
import AccountContainer from 'pl-fe/containers/account-container';
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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
import { makeGetNotification } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores/modals';
import { useSettingsStore } from 'pl-fe/stores/settings';

View file

@ -5,7 +5,8 @@ import ReactSwipeableViews from 'react-swipeable-views';
import { endOnboarding } from 'pl-fe/actions/onboarding';
import LandingGradient from 'pl-fe/components/landing-gradient';
import HStack from 'pl-fe/components/ui/hstack';
import { useAppDispatch, useFeatures } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import AvatarSelectionStep from './steps/avatar-selection-step';
import BioStep from './steps/bio-step';

View file

@ -9,7 +9,8 @@ import Button from 'pl-fe/components/ui/button';
import Icon from 'pl-fe/components/ui/icon';
import Spinner from 'pl-fe/components/ui/spinner';
import Stack from 'pl-fe/components/ui/stack';
import { useAppDispatch, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import toast from 'pl-fe/toast';
import { isDefaultAvatar } from 'pl-fe/utils/accounts';
import resizeImage from 'pl-fe/utils/resize-image';

View file

@ -7,7 +7,8 @@ import Button from 'pl-fe/components/ui/button';
import FormGroup from 'pl-fe/components/ui/form-group';
import Stack from 'pl-fe/components/ui/stack';
import Textarea from 'pl-fe/components/ui/textarea';
import { useAppDispatch, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import toast from 'pl-fe/toast';
import type { PlfeResponse } from 'pl-fe/api';

View file

@ -11,7 +11,8 @@ import Icon from 'pl-fe/components/ui/icon';
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, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import toast from 'pl-fe/toast';
import { isDefaultHeader } from 'pl-fe/utils/accounts';
import resizeImage from 'pl-fe/utils/resize-image';

View file

@ -7,7 +7,8 @@ import Button from 'pl-fe/components/ui/button';
import FormGroup from 'pl-fe/components/ui/form-group';
import Input from 'pl-fe/components/ui/input';
import Stack from 'pl-fe/components/ui/stack';
import { useAppDispatch, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import toast from 'pl-fe/toast';
import type { PlfeResponse } from 'pl-fe/api';

View file

@ -7,7 +7,8 @@ import Card, { CardBody } from 'pl-fe/components/ui/card';
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 { useInstance, useOwnAccount } from 'pl-fe/hooks';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
const FediverseStep = ({ onNext }: { onNext: () => void }) => {
const { account } = useOwnAccount();

View file

@ -18,7 +18,9 @@ import Streamfield from 'pl-fe/components/ui/streamfield';
import Textarea from 'pl-fe/components/ui/textarea';
import Toggle from 'pl-fe/components/ui/toggle';
import ThemeSelector from 'pl-fe/features/ui/components/theme-selector';
import { useAppSelector, useAppDispatch, useFeatures } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { normalizePlFeConfig } from 'pl-fe/normalizers';
import toast from 'pl-fe/toast';

View file

@ -7,7 +7,9 @@ import List, { ListItem } from 'pl-fe/components/list';
import Form from 'pl-fe/components/ui/form';
import { Mutliselect, SelectDropdown } from 'pl-fe/features/forms';
import SettingToggle from 'pl-fe/features/notifications/components/setting-toggle';
import { useAppDispatch, useFeatures, useSettings } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useSettings } from 'pl-fe/hooks/useSettings';
import ThemeToggle from '../ui/components/theme-toggle';

View file

@ -8,7 +8,10 @@ import { usePublicStream } from 'pl-fe/api/hooks/streaming/usePublicStream';
import PullToRefresh from 'pl-fe/components/pull-to-refresh';
import Accordion from 'pl-fe/components/ui/accordion';
import Column from 'pl-fe/components/ui/column';
import { useAppDispatch, useInstance, useSettings, useTheme } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
import PinnedHostsPicker from '../remote-timeline/components/pinned-hosts-picker';

View file

@ -7,7 +7,9 @@ import { useParams } from 'react-router-dom';
import { expandStatusQuotes, fetchStatusQuotes } from 'pl-fe/actions/status-quotes';
import StatusList from 'pl-fe/components/status-list';
import Column from 'pl-fe/components/ui/column';
import { useAppDispatch, useAppSelector, useTheme } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
const messages = defineMessages({

View file

@ -8,7 +8,9 @@ import IconButton from 'pl-fe/components/icon-button';
import Column from 'pl-fe/components/ui/column';
import HStack from 'pl-fe/components/ui/hstack';
import Text from 'pl-fe/components/ui/text';
import { useAppDispatch, useSettings, useTheme } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
import Timeline from '../ui/components/timeline';

View file

@ -6,7 +6,10 @@ import List, { ListItem } from 'pl-fe/components/list';
import Card, { CardBody, CardHeader, CardTitle } from 'pl-fe/components/ui/card';
import Column from 'pl-fe/components/ui/column';
import Text from 'pl-fe/components/ui/text';
import { useAppDispatch, useAppSelector, useFeatures, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import Preferences from '../preferences';

View file

@ -5,7 +5,8 @@ import Button from 'pl-fe/components/ui/button';
import Card, { CardTitle } from 'pl-fe/components/ui/card';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useInstance, usePlFeConfig } from 'pl-fe/hooks';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
/** Prompts logged-out users to log in when viewing a thread. */
const ThreadLoginCta: React.FC = () => {

View file

@ -8,7 +8,9 @@ import PullToRefresh from 'pl-fe/components/pull-to-refresh';
import Column from 'pl-fe/components/ui/column';
import Stack from 'pl-fe/components/ui/stack';
import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status';
import { useAppDispatch, useAppSelector, useLoggedIn } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
import { makeGetStatus } from 'pl-fe/selectors';
import Thread from './components/thread';

View file

@ -5,7 +5,8 @@ import { importFetchedStatuses } from 'pl-fe/actions/importer';
import { expandTimelineSuccess } from 'pl-fe/actions/timelines';
import Column from 'pl-fe/components/ui/column';
import Timeline from 'pl-fe/features/ui/components/timeline';
import { useAppDispatch, useTheme } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
const messages = defineMessages({

View file

@ -11,7 +11,9 @@ import Column from 'pl-fe/components/ui/column';
import Form from 'pl-fe/components/ui/form';
import FormActions from 'pl-fe/components/ui/form-actions';
import ColorPicker from 'pl-fe/features/pl-fe-config/components/color-picker';
import { useAppDispatch, useAppSelector, usePlFeConfig } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
import { normalizePlFeConfig } from 'pl-fe/normalizers';
import toast from 'pl-fe/toast';
import { download } from 'pl-fe/utils/download';

View file

@ -13,7 +13,9 @@ import {
import { useFollow } from 'pl-fe/api/hooks/accounts/useFollow';
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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
import { useModalsStore } from 'pl-fe/stores/modals';
import toast from 'pl-fe/toast';

View file

@ -17,7 +17,9 @@ import Modal from 'pl-fe/components/ui/modal';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import Toggle from 'pl-fe/components/ui/toggle';
import { useAppDispatch, useFeatures, useOwnAccount } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import toast from 'pl-fe/toast';
import { getBadges } from 'pl-fe/utils/badges';

View file

@ -6,7 +6,9 @@ import { cancelReplyCompose, uploadCompose } from 'pl-fe/actions/compose';
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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles';
import { useModalsStore } from 'pl-fe/stores/modals';
import ComposeForm from '../../../compose/components/compose-form';

View file

@ -5,7 +5,8 @@ import { FormattedMessage } from 'react-intl';
import Button from 'pl-fe/components/ui/button';
import Modal from 'pl-fe/components/ui/modal';
import Stack from 'pl-fe/components/ui/stack';
import { useAppSelector, usePlFeConfig } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
import { makeGetStatus } from 'pl-fe/selectors';
import 'leaflet/dist/leaflet.css';

View file

@ -3,7 +3,8 @@ import React from 'react';
import { FormattedMessage } from 'react-intl';
import Modal from 'pl-fe/components/ui/modal';
import { useFeatures, useLoggedIn } from 'pl-fe/hooks';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
import type { BaseModalProps } from '../modal-root';

View file

@ -7,7 +7,8 @@ import Input from 'pl-fe/components/ui/input';
import Textarea from 'pl-fe/components/ui/textarea';
import AvatarPicker from 'pl-fe/features/edit-profile/components/avatar-picker';
import HeaderPicker from 'pl-fe/features/edit-profile/components/header-picker';
import { useAppSelector, useInstance } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { usePreview } from 'pl-fe/hooks/forms/usePreview';
import resizeImage from 'pl-fe/utils/resize-image';

View file

@ -3,7 +3,9 @@ import { FormattedMessage } from 'react-intl';
import Modal from 'pl-fe/components/ui/modal';
import Account from 'pl-fe/features/reply-mentions/account';
import { useAppSelector, useCompose, useOwnAccount } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useCompose } from 'pl-fe/hooks/useCompose';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { statusToMentionsAccountIdsArray } from 'pl-fe/reducers/compose';
import { makeGetStatus } from 'pl-fe/selectors';

View file

@ -12,7 +12,9 @@ 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 AccountContainer from 'pl-fe/containers/account-container';
import { useAppDispatch, useAppSelector, useInstance } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useInstance } from 'pl-fe/hooks/useInstance';
import ConfirmationStep from './steps/confirmation-step';
import OtherActionsStep from './steps/other-actions-step';

View file

@ -9,7 +9,8 @@ import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import Toggle from 'pl-fe/components/ui/toggle';
import StatusCheckBox from 'pl-fe/features/ui/components/modals/report-modal/components/status-check-box';
import { useAppSelector, useFeatures } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { getDomain } from 'pl-fe/utils/accounts';
import type { Account } from 'pl-fe/normalizers/account';

View file

@ -9,7 +9,11 @@ import Input from 'pl-fe/components/ui/input';
import Modal from 'pl-fe/components/ui/modal';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import { useAppSelector, useAppDispatch, useFeatures, useInstance, useRegistrationStatus } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus';
import { selectAccount } from 'pl-fe/selectors';
import toast from 'pl-fe/toast';

View file

@ -3,7 +3,9 @@ import { useIntl, defineMessages } from 'react-intl';
import { pinHost, unpinHost } from 'pl-fe/actions/remote-timeline';
import Widget from 'pl-fe/components/ui/widget';
import { useAppSelector, useAppDispatch, useSettings } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { makeGetRemoteInstance } from 'pl-fe/selectors';
const getRemoteInstance = makeGetRemoteInstance();

View file

@ -4,7 +4,8 @@ import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
import DropdownMenu from 'pl-fe/components/dropdown-menu';
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 { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { makeGetRemoteInstance } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores/modals';

View file

@ -10,7 +10,8 @@ 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 { useAppSelector, usePlFeConfig } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
import { capitalize } from 'pl-fe/utils/strings';
import ProfileFamiliarFollowers from '../profile-familiar-followers';

View file

@ -4,7 +4,9 @@ import ForkAwesomeIcon from 'pl-fe/components/fork-awesome-icon';
import List, { ListItem } from 'pl-fe/components/list';
import HStack from 'pl-fe/components/ui/hstack';
import Widget from 'pl-fe/components/ui/widget';
import { useInstance, useSettings, usePlFeConfig } from 'pl-fe/hooks';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
const PromoPanel: React.FC = () => {
const instance = useInstance();

View file

@ -10,7 +10,10 @@ import Text from 'pl-fe/components/ui/text';
import LoginForm from 'pl-fe/features/auth-login/components/login-form';
import OtpAuthForm from 'pl-fe/features/auth-login/components/otp-auth-form';
import ExternalLoginForm from 'pl-fe/features/external-login/components/external-login-form';
import { useAppDispatch, useAppSelector, useInstance, useRegistrationStatus } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus';
import { getRedirectUrl } from 'pl-fe/utils/redirect';
import { isStandalone } from 'pl-fe/utils/state';

View file

@ -9,7 +9,8 @@ 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 VerificationBadge from 'pl-fe/components/verification-badge';
import { useAppSelector, useSettings } from 'pl-fe/hooks';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { getAcct } from 'pl-fe/utils/accounts';
import { shortNumberFormat } from 'pl-fe/utils/numbers';
import { displayFqn } from 'pl-fe/utils/state';

View file

@ -17,7 +17,14 @@ import { useUserStream } from 'pl-fe/api/hooks/streaming/useUserStream';
import SidebarNavigation from 'pl-fe/components/sidebar-navigation';
import ThumbNavigation from 'pl-fe/components/thumb-navigation';
import Layout from 'pl-fe/components/ui/layout';
import { useAppDispatch, useAppSelector, useOwnAccount, usePlFeConfig, useFeatures, useDraggedFiles, useInstance, useLoggedIn } from 'pl-fe/hooks';
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
import { useFeatures } from 'pl-fe/hooks/useFeatures';
import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles';
import { useInstance } from 'pl-fe/hooks/useInstance';
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
import AdminLayout from 'pl-fe/layouts/admin-layout';
import ChatsLayout from 'pl-fe/layouts/chats-layout';
import DefaultLayout from 'pl-fe/layouts/default-layout';

View file

@ -3,7 +3,8 @@ 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 { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useModalsStore } from 'pl-fe/stores/modals';
import { HotKeys } from '../components/hotkeys';

View file

@ -3,7 +3,8 @@ import { ErrorBoundary, type FallbackProps } from 'react-error-boundary';
import { Redirect, Route, useHistory, RouteProps, RouteComponentProps, match as MatchType, useLocation } from 'react-router-dom';
import Layout from 'pl-fe/components/ui/layout';
import { useOwnAccount, useSettings } from 'pl-fe/hooks';
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
import { useSettings } from 'pl-fe/hooks/useSettings';
import ColumnForbidden from '../components/column-forbidden';
import ColumnLoading from '../components/column-loading';

View file

@ -1,22 +0,0 @@
export { useAppDispatch } from './useAppDispatch';
export { useAppSelector } from './useAppSelector';
export { useClickOutside } from './useClickOutside';
export { useClient } from './useClient';
export { useCompose } from './useCompose';
export { useDebounce } from './useDebounce';
export { useDraggedFiles } from './useDraggedFiles';
export { useGetState } from './useGetState';
export { useDimensions } from './useDimensions';
export { useFeatures } from './useFeatures';
export { useInstance } from './useInstance';
export { useLoading } from './useLoading';
export { useLocale } from './useLocale';
export { useLoggedIn } from './useLoggedIn';
export { useLogo } from './useLogo';
export { useOwnAccount } from './useOwnAccount';
export { usePrevious } from './usePrevious';
export { useRegistrationStatus } from './useRegistrationStatus';
export { useSettings } from './useSettings';
export { usePlFeConfig } from './usePlFeConfig';
export { useSystemTheme } from './useSystemTheme';
export { useTheme } from './useTheme';

View file

@ -1,12 +1,10 @@
import clsx from 'clsx';
import React, { useEffect } from 'react';
import {
useSettings,
usePlFeConfig,
useTheme,
useLocale,
} from 'pl-fe/hooks';
import { useLocale } from 'pl-fe/hooks/useLocale';
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
import { useSettings } from 'pl-fe/hooks/useSettings';
import { useTheme } from 'pl-fe/hooks/useTheme';
import { normalizePlFeConfig } from 'pl-fe/normalizers';
import { startSentry } from 'pl-fe/sentry';
import { useModalsStore } from 'pl-fe/stores/modals';

Some files were not shown because too many files have changed in this diff Show more