ProfilePage: fix types of async components

This commit is contained in:
Alex Gleason 2023-10-07 15:43:34 -05:00
parent 5b539416d9
commit 0f10922c3d
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
7 changed files with 10 additions and 9 deletions

View File

@ -7,8 +7,8 @@ import { submitAccountNote } from 'soapbox/actions/account-notes';
import { HStack, Text, Widget } from 'soapbox/components/ui';
import { useAppDispatch } from 'soapbox/hooks';
import type { Account as AccountEntity } from 'soapbox/schemas';
import type { AppDispatch } from 'soapbox/store';
import type { Account as AccountEntity } from 'soapbox/types/entities';
const onSave = debounce(
(dispatch: AppDispatch, id: string, value: string, callback: () => void) =>

View File

@ -9,7 +9,7 @@ import BundleContainer from 'soapbox/features/ui/containers/bundle-container';
import { WhoToFollowPanel } from 'soapbox/features/ui/util/async-components';
import { useAppDispatch, useAppSelector } from 'soapbox/hooks';
import type { Account } from 'soapbox/types/entities';
import type { Account } from 'soapbox/schemas';
interface IPinnedAccountsPanel {
account: Account;

View File

@ -12,7 +12,7 @@ import VerificationBadge from 'soapbox/components/verification-badge';
import { useAppDispatch, useAppSelector, useFeatures } from 'soapbox/hooks';
import { makeGetAccount } from 'soapbox/selectors';
import type { Account } from 'soapbox/types/entities';
import type { Account } from 'soapbox/schemas';
const getAccount = makeGetAccount();

View File

@ -5,7 +5,7 @@ import { Widget, Stack } from 'soapbox/components/ui';
import ProfileField from './profile-field';
import type { Account } from 'soapbox/types/entities';
import type { Account } from 'soapbox/schemas';
interface IProfileFieldsPanel {
account: Account;

View File

@ -15,7 +15,7 @@ import ProfileFamiliarFollowers from './profile-familiar-followers';
import ProfileField from './profile-field';
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 */
const isSafeUrl = (text: string): boolean => {

View File

@ -10,7 +10,8 @@ import { getAccountGallery } from 'soapbox/selectors';
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 {
account?: Account;

View File

@ -13,15 +13,15 @@ import { federationRestrictionsDisclosed } from 'soapbox/utils/state';
import { Layout } from '../components/ui';
interface IRemoteInstancePage {
params?: {
instance?: string;
params: {
instance: string;
};
children: React.ReactNode;
}
/** Page for viewing a remote instance timeline. */
const RemoteInstancePage: React.FC<IRemoteInstancePage> = ({ children, params }) => {
const host = params?.instance;
const host = params.instance;
const { account } = useOwnAccount();
const disclosed = useAppSelector(federationRestrictionsDisclosed);