ProfilePage: fix types of async components
This commit is contained in:
parent
5b539416d9
commit
0f10922c3d
|
@ -7,8 +7,8 @@ import { submitAccountNote } from 'soapbox/actions/account-notes';
|
||||||
import { HStack, Text, Widget } from 'soapbox/components/ui';
|
import { HStack, Text, Widget } from 'soapbox/components/ui';
|
||||||
import { useAppDispatch } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks';
|
||||||
|
|
||||||
|
import type { Account as AccountEntity } from 'soapbox/schemas';
|
||||||
import type { AppDispatch } from 'soapbox/store';
|
import type { AppDispatch } from 'soapbox/store';
|
||||||
import type { Account as AccountEntity } from 'soapbox/types/entities';
|
|
||||||
|
|
||||||
const onSave = debounce(
|
const onSave = debounce(
|
||||||
(dispatch: AppDispatch, id: string, value: string, callback: () => void) =>
|
(dispatch: AppDispatch, id: string, value: string, callback: () => void) =>
|
||||||
|
|
|
@ -9,7 +9,7 @@ import BundleContainer from 'soapbox/features/ui/containers/bundle-container';
|
||||||
import { WhoToFollowPanel } from 'soapbox/features/ui/util/async-components';
|
import { WhoToFollowPanel } from 'soapbox/features/ui/util/async-components';
|
||||||
import { useAppDispatch, useAppSelector } from 'soapbox/hooks';
|
import { useAppDispatch, useAppSelector } from 'soapbox/hooks';
|
||||||
|
|
||||||
import type { Account } from 'soapbox/types/entities';
|
import type { Account } from 'soapbox/schemas';
|
||||||
|
|
||||||
interface IPinnedAccountsPanel {
|
interface IPinnedAccountsPanel {
|
||||||
account: Account;
|
account: Account;
|
||||||
|
|
|
@ -12,7 +12,7 @@ import VerificationBadge from 'soapbox/components/verification-badge';
|
||||||
import { useAppDispatch, useAppSelector, useFeatures } from 'soapbox/hooks';
|
import { useAppDispatch, useAppSelector, useFeatures } from 'soapbox/hooks';
|
||||||
import { makeGetAccount } from 'soapbox/selectors';
|
import { makeGetAccount } from 'soapbox/selectors';
|
||||||
|
|
||||||
import type { Account } from 'soapbox/types/entities';
|
import type { Account } from 'soapbox/schemas';
|
||||||
|
|
||||||
const getAccount = makeGetAccount();
|
const getAccount = makeGetAccount();
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Widget, Stack } from 'soapbox/components/ui';
|
||||||
|
|
||||||
import ProfileField from './profile-field';
|
import ProfileField from './profile-field';
|
||||||
|
|
||||||
import type { Account } from 'soapbox/types/entities';
|
import type { Account } from 'soapbox/schemas';
|
||||||
|
|
||||||
interface IProfileFieldsPanel {
|
interface IProfileFieldsPanel {
|
||||||
account: Account;
|
account: Account;
|
||||||
|
|
|
@ -15,7 +15,7 @@ import ProfileFamiliarFollowers from './profile-familiar-followers';
|
||||||
import ProfileField from './profile-field';
|
import ProfileField from './profile-field';
|
||||||
import ProfileStats from './profile-stats';
|
import ProfileStats from './profile-stats';
|
||||||
|
|
||||||
import type { Account } from 'soapbox/types/entities';
|
import type { Account } from 'soapbox/schemas';
|
||||||
|
|
||||||
/** Basically ensure the URL isn't `javascript:alert('hi')` or something like that */
|
/** Basically ensure the URL isn't `javascript:alert('hi')` or something like that */
|
||||||
const isSafeUrl = (text: string): boolean => {
|
const isSafeUrl = (text: string): boolean => {
|
||||||
|
|
|
@ -10,7 +10,8 @@ import { getAccountGallery } from 'soapbox/selectors';
|
||||||
|
|
||||||
import MediaItem from '../../account-gallery/components/media-item';
|
import MediaItem from '../../account-gallery/components/media-item';
|
||||||
|
|
||||||
import type { Account, Attachment } from 'soapbox/types/entities';
|
import type { Account } from 'soapbox/schemas';
|
||||||
|
import type { Attachment } from 'soapbox/types/entities';
|
||||||
|
|
||||||
interface IProfileMediaPanel {
|
interface IProfileMediaPanel {
|
||||||
account?: Account;
|
account?: Account;
|
||||||
|
|
|
@ -13,15 +13,15 @@ import { federationRestrictionsDisclosed } from 'soapbox/utils/state';
|
||||||
import { Layout } from '../components/ui';
|
import { Layout } from '../components/ui';
|
||||||
|
|
||||||
interface IRemoteInstancePage {
|
interface IRemoteInstancePage {
|
||||||
params?: {
|
params: {
|
||||||
instance?: string;
|
instance: string;
|
||||||
};
|
};
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Page for viewing a remote instance timeline. */
|
/** Page for viewing a remote instance timeline. */
|
||||||
const RemoteInstancePage: React.FC<IRemoteInstancePage> = ({ children, params }) => {
|
const RemoteInstancePage: React.FC<IRemoteInstancePage> = ({ children, params }) => {
|
||||||
const host = params?.instance;
|
const host = params.instance;
|
||||||
|
|
||||||
const { account } = useOwnAccount();
|
const { account } = useOwnAccount();
|
||||||
const disclosed = useAppSelector(federationRestrictionsDisclosed);
|
const disclosed = useAppSelector(federationRestrictionsDisclosed);
|
||||||
|
|
Loading…
Reference in New Issue