pl-fe: Remove unused exports
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
e28d6d0223
commit
86cb31918d
22 changed files with 32 additions and 76 deletions
|
@ -90,7 +90,6 @@ type BookmarksAction =
|
|||
ReturnType<typeof fetchBookmarkedStatusesRequest>
|
||||
| ReturnType<typeof fetchBookmarkedStatusesSuccess>
|
||||
| ReturnType<typeof fetchBookmarkedStatusesFail>
|
||||
| ReturnType<typeof expandBookmarkedStatuses>
|
||||
| ReturnType<typeof expandBookmarkedStatusesRequest>
|
||||
| ReturnType<typeof expandBookmarkedStatusesSuccess>
|
||||
| ReturnType<typeof expandBookmarkedStatusesFail>;
|
||||
|
|
|
@ -6,9 +6,9 @@ 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';
|
||||
|
||||
const STATUS_IMPORT = 'STATUS_IMPORT';
|
||||
const STATUSES_IMPORT = 'STATUSES_IMPORT';
|
||||
const POLLS_IMPORT = 'POLLS_IMPORT';
|
||||
const STATUS_IMPORT = 'STATUS_IMPORT' as const;
|
||||
const STATUSES_IMPORT = 'STATUSES_IMPORT' as const;
|
||||
const POLLS_IMPORT = 'POLLS_IMPORT' as const;
|
||||
|
||||
const importAccount = (data: BaseAccount) => importAccounts([data]);
|
||||
|
||||
|
@ -153,6 +153,11 @@ const importFetchedPoll = (poll: Poll) =>
|
|||
dispatch(importPolls([poll]));
|
||||
};
|
||||
|
||||
type ImporterAction =
|
||||
| ReturnType<typeof importStatus>
|
||||
| ReturnType<typeof importStatuses>
|
||||
| ReturnType<typeof importPolls>;
|
||||
|
||||
export {
|
||||
STATUS_IMPORT,
|
||||
STATUSES_IMPORT,
|
||||
|
@ -169,4 +174,5 @@ export {
|
|||
importFetchedStatus,
|
||||
importFetchedStatuses,
|
||||
importFetchedPoll,
|
||||
type ImporterAction,
|
||||
};
|
||||
|
|
|
@ -31,4 +31,4 @@ const ForkAwesomeIcon: React.FC<IForkAwesomeIcon> = ({ id, className, fixedWidth
|
|||
);
|
||||
};
|
||||
|
||||
export { type IForkAwesomeIcon, ForkAwesomeIcon as default };
|
||||
export { ForkAwesomeIcon as default };
|
||||
|
|
|
@ -563,7 +563,4 @@ const MediaGallery: React.FC<IMediaGallery> = (props) => {
|
|||
);
|
||||
};
|
||||
|
||||
export {
|
||||
type IMediaGallery,
|
||||
MediaGallery as default,
|
||||
};
|
||||
export { MediaGallery as default };
|
||||
|
|
|
@ -120,7 +120,6 @@ const Column = React.forwardRef<HTMLDivElement, IColumn>((props, ref): JSX.Eleme
|
|||
});
|
||||
|
||||
export {
|
||||
type IColumn,
|
||||
Column as default,
|
||||
Column,
|
||||
ColumnHeader,
|
||||
|
|
|
@ -85,8 +85,4 @@ const ScheduleForm: React.FC<IScheduleForm> = ({ composeId }) => {
|
|||
);
|
||||
};
|
||||
|
||||
export {
|
||||
isCurrentOrFutureDate,
|
||||
type IScheduleForm,
|
||||
ScheduleForm as default,
|
||||
};
|
||||
export { ScheduleForm as default, isCurrentOrFutureDate };
|
||||
|
|
|
@ -88,8 +88,4 @@ const UploadButton: React.FC<IUploadButton> = ({
|
|||
);
|
||||
};
|
||||
|
||||
export {
|
||||
onlyImages,
|
||||
type IUploadButton,
|
||||
UploadButton as default,
|
||||
};
|
||||
export { UploadButton as default, onlyImages };
|
||||
|
|
|
@ -170,8 +170,6 @@ const $isImageNode = (
|
|||
): node is ImageNode => node instanceof ImageNode;
|
||||
|
||||
export {
|
||||
type ImagePayload,
|
||||
type SerializedImageNode,
|
||||
ImageNode,
|
||||
$createImageNode,
|
||||
$isImageNode,
|
||||
|
|
|
@ -32,7 +32,4 @@ const LightningAddress: React.FC<ILightningAddress> = (props): JSX.Element => {
|
|||
);
|
||||
};
|
||||
|
||||
export {
|
||||
type ILightningAddress,
|
||||
LightningAddress as default,
|
||||
};
|
||||
export { LightningAddress as default };
|
||||
|
|
|
@ -48,13 +48,8 @@ const emojiData = data as EmojiData;
|
|||
const { categories, emojis, aliases, sheet } = emojiData;
|
||||
|
||||
export {
|
||||
type NativeEmoji,
|
||||
type CustomEmoji,
|
||||
type Emoji,
|
||||
type EmojiCategory,
|
||||
type EmojiMap,
|
||||
type EmojiAlias,
|
||||
type EmojiSheet,
|
||||
type EmojiData,
|
||||
categories,
|
||||
emojis,
|
||||
|
|
|
@ -75,8 +75,4 @@ const search = (
|
|||
}
|
||||
}).filter(Boolean) as Emoji[];
|
||||
|
||||
export {
|
||||
type searchOptions,
|
||||
addCustomToPool,
|
||||
search as default,
|
||||
};
|
||||
export { search as default, addCustomToPool };
|
||||
|
|
|
@ -11,4 +11,4 @@ const HotKeys = React.forwardRef<any, HotKeysProps>(({ children, ...rest }, ref)
|
|||
</_HotKeys>
|
||||
));
|
||||
|
||||
export { HotKeys, type HotKeysProps as IHotKeys };
|
||||
export { HotKeys };
|
||||
|
|
|
@ -37,4 +37,4 @@ const useImageField = (opts: UseImageFieldOpts = {}) => {
|
|||
};
|
||||
};
|
||||
|
||||
export { type UseImageFieldOpts, useImageField };
|
||||
export { useImageField };
|
||||
|
|
|
@ -5,30 +5,6 @@ import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
|||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
import toast from 'pl-fe/toast';
|
||||
|
||||
type IAccount = {
|
||||
acct: string;
|
||||
avatar: string;
|
||||
avatar_static: string;
|
||||
bot: boolean;
|
||||
created_at: string;
|
||||
discoverable: boolean;
|
||||
display_name: string;
|
||||
followers_count: number;
|
||||
following_count: number;
|
||||
group: boolean;
|
||||
header: string;
|
||||
header_static: string;
|
||||
id: string;
|
||||
last_status_at: string;
|
||||
location: string;
|
||||
locked: boolean;
|
||||
note: string;
|
||||
statuses_count: number;
|
||||
url: string;
|
||||
username: string;
|
||||
verified: boolean;
|
||||
}
|
||||
|
||||
type UpdateCredentialsData = {
|
||||
accepts_chat_messages?: boolean;
|
||||
}
|
||||
|
@ -58,4 +34,4 @@ const useUpdateCredentials = () => {
|
|||
});
|
||||
};
|
||||
|
||||
export { type IAccount, useUpdateCredentials };
|
||||
export { useUpdateCredentials };
|
||||
|
|
|
@ -605,7 +605,6 @@ const compose = (state = initialState, action: ComposeAction | EventsAction | In
|
|||
|
||||
export {
|
||||
ReducerCompose,
|
||||
type Compose,
|
||||
statusToMentionsArray,
|
||||
statusToMentionsAccountIdsArray,
|
||||
initialState,
|
||||
|
|
|
@ -11,8 +11,9 @@ import {
|
|||
CONTEXT_FETCH_SUCCESS,
|
||||
STATUS_CREATE_REQUEST,
|
||||
STATUS_CREATE_SUCCESS,
|
||||
type StatusesAction,
|
||||
} from '../actions/statuses';
|
||||
import { TIMELINE_DELETE } from '../actions/timelines';
|
||||
import { TIMELINE_DELETE, type TimelineAction } from '../actions/timelines';
|
||||
|
||||
import type { Status } from 'pl-api';
|
||||
import type { AnyAction } from 'redux';
|
||||
|
@ -185,7 +186,7 @@ const deletePendingStatus = (state: State, params: Pick<Status, 'id' | 'in_reply
|
|||
};
|
||||
|
||||
/** Contexts reducer. Used for building a nested tree structure for threads. */
|
||||
const replies = (state = ReducerRecord(), action: AnyAction) => {
|
||||
const replies = (state = ReducerRecord(), action: AnyAction | StatusesAction | TimelineAction) => {
|
||||
switch (action.type) {
|
||||
case ACCOUNT_BLOCK_SUCCESS:
|
||||
case ACCOUNT_MUTE_SUCCESS:
|
||||
|
|
|
@ -11,6 +11,7 @@ import {
|
|||
STATUS_QUOTES_FETCH_FAIL,
|
||||
STATUS_QUOTES_FETCH_REQUEST,
|
||||
STATUS_QUOTES_FETCH_SUCCESS,
|
||||
type StatusQuotesAction,
|
||||
} from 'pl-fe/actions/status-quotes';
|
||||
import { STATUS_CREATE_SUCCESS } from 'pl-fe/actions/statuses';
|
||||
|
||||
|
@ -21,6 +22,7 @@ import {
|
|||
BOOKMARKED_STATUSES_EXPAND_REQUEST,
|
||||
BOOKMARKED_STATUSES_EXPAND_SUCCESS,
|
||||
BOOKMARKED_STATUSES_EXPAND_FAIL,
|
||||
type BookmarksAction,
|
||||
} from '../actions/bookmarks';
|
||||
import {
|
||||
RECENT_EVENTS_FETCH_REQUEST,
|
||||
|
@ -150,7 +152,7 @@ const removeBookmarkFromLists = (state: State, status: Pick<Status, 'id' | 'book
|
|||
return state;
|
||||
};
|
||||
|
||||
const statusLists = (state = initialState, action: AnyAction | FavouritesAction | InteractionsAction | PinStatusesAction) => {
|
||||
const statusLists = (state = initialState, action: AnyAction | BookmarksAction | FavouritesAction | InteractionsAction | PinStatusesAction | StatusQuotesAction) => {
|
||||
switch (action.type) {
|
||||
case FAVOURITED_STATUSES_FETCH_REQUEST:
|
||||
case FAVOURITED_STATUSES_EXPAND_REQUEST:
|
||||
|
|
|
@ -15,8 +15,9 @@ import {
|
|||
EVENT_JOIN_FAIL,
|
||||
EVENT_LEAVE_REQUEST,
|
||||
EVENT_LEAVE_FAIL,
|
||||
type EventsAction,
|
||||
} from '../actions/events';
|
||||
import { STATUS_IMPORT, STATUSES_IMPORT } from '../actions/importer';
|
||||
import { STATUS_IMPORT, STATUSES_IMPORT, type ImporterAction } from '../actions/importer';
|
||||
import {
|
||||
REBLOG_REQUEST,
|
||||
REBLOG_FAIL,
|
||||
|
@ -28,6 +29,7 @@ import {
|
|||
DISLIKE_REQUEST,
|
||||
UNDISLIKE_REQUEST,
|
||||
DISLIKE_FAIL,
|
||||
type InteractionsAction,
|
||||
} from '../actions/interactions';
|
||||
import {
|
||||
STATUS_CREATE_REQUEST,
|
||||
|
@ -46,8 +48,9 @@ import {
|
|||
STATUS_LANGUAGE_CHANGE,
|
||||
STATUS_COLLAPSE_SPOILER,
|
||||
STATUS_EXPAND_SPOILER,
|
||||
type StatusesAction,
|
||||
} from '../actions/statuses';
|
||||
import { TIMELINE_DELETE } from '../actions/timelines';
|
||||
import { TIMELINE_DELETE, type TimelineAction } from '../actions/timelines';
|
||||
|
||||
import type { Status as BaseStatus, Translation } from 'pl-api';
|
||||
import type { AnyAction } from 'redux';
|
||||
|
@ -184,7 +187,7 @@ const deleteTranslation = (state: State, statusId: string) => state.deleteIn([st
|
|||
|
||||
const initialState: State = ImmutableMap();
|
||||
|
||||
const statuses = (state = initialState, action: EmojiReactsAction | AnyAction): State => {
|
||||
const statuses = (state = initialState, action: AnyAction | EmojiReactsAction | EventsAction | ImporterAction | InteractionsAction | StatusesAction | TimelineAction): State => {
|
||||
switch (action.type) {
|
||||
case STATUS_IMPORT:
|
||||
return importStatus(state, action.status);
|
||||
|
|
|
@ -218,7 +218,6 @@ const userLists = (state = ReducerRecord(), action: DirectoryAction | AnyAction)
|
|||
|
||||
export {
|
||||
ListRecord,
|
||||
type List,
|
||||
ReactionRecord,
|
||||
ParticipationRequest,
|
||||
ReducerRecord,
|
||||
|
|
|
@ -347,7 +347,6 @@ const makeGetStatusIds = () => createSelector([
|
|||
);
|
||||
|
||||
export {
|
||||
type HostFederation,
|
||||
type RemoteInstance,
|
||||
selectAccount,
|
||||
selectAccounts,
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import { useHistory, useLocation } from 'react-router-dom';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
type History = ReturnType<typeof useHistory>;
|
||||
type Location = ReturnType<typeof useLocation>;
|
||||
|
||||
export type {
|
||||
History,
|
||||
Location,
|
||||
};
|
||||
|
|
|
@ -57,4 +57,4 @@ const ConfigDB = {
|
|||
fromSimplePolicy,
|
||||
};
|
||||
|
||||
export { type Config, type Policy, ConfigDB as default };
|
||||
export { type Config, ConfigDB as default };
|
||||
|
|
Loading…
Reference in a new issue