diff --git a/src/actions/compose.ts b/src/actions/compose.ts index 5ff7ac3cf..50c8afca1 100644 --- a/src/actions/compose.ts +++ b/src/actions/compose.ts @@ -379,12 +379,12 @@ const submitCompose = (composeId: string, opts: SubmitComposeOpts = {}) => params.group_id = compose.group_id; } - return dispatch(createStatus(params, idempotencyKey, statusId)).then(function(data) { + return dispatch(createStatus(params, idempotencyKey, statusId)).then((data) => { if (!statusId && data.visibility === 'direct' && getState().conversations.mounted <= 0 && history) { history.push('/messages'); } handleComposeSubmit(dispatch, getState, composeId, data, status, !!statusId); - }).catch(function(error) { + }).catch((error) => { dispatch(submitComposeFail(composeId, error)); }); }; diff --git a/src/actions/emoji-reacts.ts b/src/actions/emoji-reacts.ts index 572414cbf..e73d56ca1 100644 --- a/src/actions/emoji-reacts.ts +++ b/src/actions/emoji-reacts.ts @@ -77,10 +77,10 @@ const emojiReact = (status: Status, emoji: string, custom?: string) => return api(getState)(`/api/v1/pleroma/statuses/${status.id}/reactions/${emoji}`, { method: 'PUT', - }).then(function(response) { + }).then((response) => { dispatch(importFetchedStatus(response.json)); dispatch(emojiReactSuccess(status, emoji)); - }).catch(function(error) { + }).catch((error) => { dispatch(emojiReactFail(status, emoji, error)); }); }; diff --git a/src/actions/events.ts b/src/actions/events.ts index 66029994c..8d01c2ba6 100644 --- a/src/actions/events.ts +++ b/src/actions/events.ts @@ -237,7 +237,7 @@ const submitEvent = () => actionLink: `/@${data.account.acct}/events/${data.id}`, }, ); - }).catch(function(error) { + }).catch((error) => { dispatch(submitEventFail(error)); }); }; @@ -281,7 +281,7 @@ const joinEvent = (id: string, participationMessage?: string) => actionLink: `/@${data.account.acct}/events/${data.id}`, }, ); - }).catch(function(error) { + }).catch((error) => { dispatch(joinEventFail(error, status, status?.event?.join_state || null)); }); }; @@ -318,7 +318,7 @@ const leaveEvent = (id: string) => }).then(({ json: data }) => { dispatch(importFetchedStatus(data)); dispatch(leaveEventSuccess(data)); - }).catch(function(error) { + }).catch((error) => { dispatch(leaveEventFail(error, status)); }); }; diff --git a/src/actions/interactions.ts b/src/actions/interactions.ts index 93849d511..4b5674536 100644 --- a/src/actions/interactions.ts +++ b/src/actions/interactions.ts @@ -88,12 +88,12 @@ const messages = defineMessages({ }); const reblog = (status: StatusEntity) => - function(dispatch: AppDispatch, getState: () => RootState) { + (dispatch: AppDispatch, getState: () => RootState) => { if (!isLoggedIn(getState)) return; dispatch(reblogRequest(status)); - api(getState)(`/api/v1/statuses/${status.id}/reblog`, { method: 'POST' }).then(function(response) { + api(getState)(`/api/v1/statuses/${status.id}/reblog`, { method: 'POST' }).then((response) => { // The reblog API method returns a new status wrapped around the original. In this case we are only // interested in how the original is modified, hence passing it skipping the wrapper dispatch(importFetchedStatus(response.json.reblog)); @@ -169,9 +169,9 @@ const favourite = (status: StatusEntity) => dispatch(favouriteRequest(status)); - api(getState)(`/api/v1/statuses/${status.id}/favourite`, { method: 'POST' }).then(function(response) { + api(getState)(`/api/v1/statuses/${status.id}/favourite`, { method: 'POST' }).then(() => { dispatch(favouriteSuccess(status)); - }).catch(function(error) { + }).catch((error) => { dispatch(favouriteFail(status, error)); }); }; @@ -242,9 +242,9 @@ const dislike = (status: StatusEntity) => dispatch(dislikeRequest(status)); - api(getState)(`/api/friendica/statuses/${status.id}/dislike`, { method: 'POST' }).then(function() { + api(getState)(`/api/friendica/statuses/${status.id}/dislike`, { method: 'POST' }).then(() => { dispatch(dislikeSuccess(status)); - }).catch(function(error) { + }).catch((error) => { dispatch(dislikeFail(status, error)); }); }; @@ -321,7 +321,7 @@ const bookmark = (status: StatusEntity, folderId?: string) => return api(getState)(`/api/v1/statuses/${status.id}/bookmark`, { method: 'POST', body: folderId ? JSON.stringify({ folder_id: folderId }) : undefined, - }).then(function(response) { + }).then((response) => { dispatch(importFetchedStatus(response.json)); dispatch(bookmarkSuccess(status, response.json)); @@ -339,7 +339,7 @@ const bookmark = (status: StatusEntity, folderId?: string) => } toast.success(typeof folderId === 'string' ? messages.folderChanged : messages.bookmarkAdded, opts); - }).catch(function(error) { + }).catch((error) => { dispatch(bookmarkFail(status, error)); }); }; diff --git a/src/actions/onboarding.ts b/src/actions/onboarding.ts index 18f75a3d6..a25b2137f 100644 --- a/src/actions/onboarding.ts +++ b/src/actions/onboarding.ts @@ -11,7 +11,7 @@ type OnboardingEndAction = { type: typeof ONBOARDING_END; } -export type OnboardingActions = OnboardingStartAction | OnboardingEndAction +type OnboardingActions = OnboardingStartAction | OnboardingEndAction const checkOnboardingStatus = () => (dispatch: React.Dispatch) => { const needsOnboarding = localStorage.getItem(ONBOARDING_LOCAL_STORAGE_KEY) === '1'; @@ -32,6 +32,7 @@ const endOnboarding = () => (dispatch: React.Dispatch) => { }; export { + type OnboardingActions, ONBOARDING_END, ONBOARDING_START, checkOnboardingStatus, diff --git a/src/api/__mocks__/index.ts b/src/api/__mocks__/index.ts index 08260cb39..b28d2e252 100644 --- a/src/api/__mocks__/index.ts +++ b/src/api/__mocks__/index.ts @@ -5,30 +5,30 @@ import { vi } from 'vitest'; const api = await vi.importActual('../index') as Record; let mocks: Array = []; -export const __stub = (func: (mock: any) => void) => mocks.push(func); -export const __clear = (): Function[] => mocks = []; +const __stub = (func: (mock: any) => void) => mocks.push(func); +const __clear = (): Function[] => mocks = []; // const setupMock = (axios: AxiosInstance) => { // const mock = new MockAdapter(axios, { onNoMatch: 'throwException' }); // mocks.map(func => func(mock)); // }; -export const staticClient = api.staticClient; +const staticClient = api.staticClient; -export const getLinks = (response: Response): LinkHeader => +const getLinks = (response: Response): LinkHeader => new LinkHeader(response.headers?.get('link') || undefined); -export const getNextLink = (response: Response) => { +const getNextLink = (response: Response) => { const nextLink = new LinkHeader(response.headers?.get('link') || undefined); return nextLink.refs.find(link => link.rel === 'next')?.uri; }; -export const getPrevLink = (response: Response) => { +const getPrevLink = (response: Response) => { const prevLink = new LinkHeader(response.headers?.get('link') || undefined); return prevLink.refs.find(link => link.rel === 'prev')?.uri; }; -export const baseClient = (...params: any[]) => { +const baseClient = (...params: any[]) => { const axios = api.baseClient(...params); // setupMock(axios); return axios; @@ -39,3 +39,5 @@ export default (...params: any[]) => { // setupMock(axios); return axios; }; + +export { __stub, __clear, staticClient, getLinks, getNextLink, getPrevLink, baseClient }; diff --git a/src/components/__mocks__/react-inlinesvg.tsx b/src/components/__mocks__/react-inlinesvg.tsx index f9a7cd892..f5eea5371 100644 --- a/src/components/__mocks__/react-inlinesvg.tsx +++ b/src/components/__mocks__/react-inlinesvg.tsx @@ -12,4 +12,4 @@ const InlineSVG: React.FC = ({ loader }): JSX.Element => { } }; -export default InlineSVG; +export { InlineSVG as default }; diff --git a/src/components/account-search.tsx b/src/components/account-search.tsx index 98cb596dd..2f0a807e2 100644 --- a/src/components/account-search.tsx +++ b/src/components/account-search.tsx @@ -89,4 +89,4 @@ const AccountSearch: React.FC = ({ onSelected, ...rest }) => { ); }; -export default AccountSearch; +export { AccountSearch as default }; diff --git a/src/components/account.tsx b/src/components/account.tsx index df7aa9d0d..ad3679eb4 100644 --- a/src/components/account.tsx +++ b/src/components/account.tsx @@ -68,7 +68,7 @@ const ProfilePopper: React.FC = ({ condition, wrapper, children ); -export interface IAccount { +interface IAccount { account: AccountSchema; action?: React.ReactElement; actionAlignment?: 'center' | 'top'; @@ -304,4 +304,4 @@ const Account = ({ ); }; -export default Account; +export { type IAccount, Account as default }; diff --git a/src/components/animated-number.tsx b/src/components/animated-number.tsx index 2c49dee9e..6148517f1 100644 --- a/src/components/animated-number.tsx +++ b/src/components/animated-number.tsx @@ -102,4 +102,4 @@ const AnimatedNumber: React.FC = ({ value, obfuscate, short, ma ); }; -export default AnimatedNumber; \ No newline at end of file +export { AnimatedNumber as default }; \ No newline at end of file diff --git a/src/components/announcements/announcement-content.tsx b/src/components/announcements/announcement-content.tsx index 07908c9b9..108b06452 100644 --- a/src/components/announcements/announcement-content.tsx +++ b/src/components/announcements/announcement-content.tsx @@ -87,4 +87,4 @@ const AnnouncementContent: React.FC = ({ announcement }) = ); }; -export default AnnouncementContent; +export { AnnouncementContent as default }; diff --git a/src/components/announcements/announcement.tsx b/src/components/announcements/announcement.tsx index 3b07e8ece..b1467a9cf 100644 --- a/src/components/announcements/announcement.tsx +++ b/src/components/announcements/announcement.tsx @@ -69,4 +69,4 @@ const Announcement: React.FC = ({ announcement, emojiMap }) => { ); }; -export default Announcement; +export { Announcement as default }; diff --git a/src/components/announcements/announcements-panel.tsx b/src/components/announcements/announcements-panel.tsx index 966df4479..cc3676330 100644 --- a/src/components/announcements/announcements-panel.tsx +++ b/src/components/announcements/announcements-panel.tsx @@ -60,4 +60,4 @@ const AnnouncementsPanel = () => { ); }; -export default AnnouncementsPanel; +export { AnnouncementsPanel as default }; diff --git a/src/components/announcements/emoji.tsx b/src/components/announcements/emoji.tsx index 1f6f8ed18..f835a21b6 100644 --- a/src/components/announcements/emoji.tsx +++ b/src/components/announcements/emoji.tsx @@ -48,4 +48,4 @@ const Emoji: React.FC = ({ emoji, emojiMap, hovered }) => { } }; -export default Emoji; +export { Emoji as default }; diff --git a/src/components/announcements/reaction.tsx b/src/components/announcements/reaction.tsx index 005d0a88e..9d7c05762 100644 --- a/src/components/announcements/reaction.tsx +++ b/src/components/announcements/reaction.tsx @@ -64,4 +64,4 @@ const Reaction: React.FC = ({ announcementId, reaction, emojiMap, sty ); }; -export default Reaction; +export { Reaction as default }; diff --git a/src/components/announcements/reactions-bar.tsx b/src/components/announcements/reactions-bar.tsx index 694e1ea2f..5488641ba 100644 --- a/src/components/announcements/reactions-bar.tsx +++ b/src/components/announcements/reactions-bar.tsx @@ -59,4 +59,4 @@ const ReactionsBar: React.FC = ({ announcementId, reactions, emoj ); }; -export default ReactionsBar; +export { ReactionsBar as default }; diff --git a/src/components/attachment-thumbs.tsx b/src/components/attachment-thumbs.tsx index abde976a1..1fc8743ae 100644 --- a/src/components/attachment-thumbs.tsx +++ b/src/components/attachment-thumbs.tsx @@ -40,4 +40,4 @@ const AttachmentThumbs = (props: IAttachmentThumbs) => { ); }; -export default AttachmentThumbs; +export { AttachmentThumbs as default }; diff --git a/src/components/autosuggest-account-input.tsx b/src/components/autosuggest-account-input.tsx index 1b7c05499..955aae065 100644 --- a/src/components/autosuggest-account-input.tsx +++ b/src/components/autosuggest-account-input.tsx @@ -93,4 +93,4 @@ const AutosuggestAccountInput: React.FC = ({ ); }; -export default AutosuggestAccountInput; +export { AutosuggestAccountInput as default }; diff --git a/src/components/autosuggest-emoji.tsx b/src/components/autosuggest-emoji.tsx index 14c6889f3..e4dd3ae17 100644 --- a/src/components/autosuggest-emoji.tsx +++ b/src/components/autosuggest-emoji.tsx @@ -40,4 +40,4 @@ const AutosuggestEmoji: React.FC = ({ emoji }) => { ); }; -export default AutosuggestEmoji; +export { AutosuggestEmoji as default }; diff --git a/src/components/autosuggest-input.tsx b/src/components/autosuggest-input.tsx index 8956b6b08..eb3e0eee1 100644 --- a/src/components/autosuggest-input.tsx +++ b/src/components/autosuggest-input.tsx @@ -13,9 +13,9 @@ import type { Menu, MenuItem } from 'soapbox/components/dropdown-menu'; import type { InputThemes } from 'soapbox/components/ui/input/input'; import type { Emoji } from 'soapbox/features/emoji'; -export type AutoSuggestion = string | Emoji; +type AutoSuggestion = string | Emoji; -export interface IAutosuggestInput extends Pick, 'onChange' | 'onKeyUp' | 'onKeyDown'> { +interface IAutosuggestInput extends Pick, 'onChange' | 'onKeyUp' | 'onKeyDown'> { value: string; suggestions: ImmutableList; disabled?: boolean; @@ -35,7 +35,7 @@ export interface IAutosuggestInput extends Pick { +class AutosuggestInput extends ImmutablePureComponent { static defaultProps = { autoFocus: false, @@ -307,3 +307,5 @@ export default class AutosuggestInput extends ImmutablePureComponent = ({ id }) => { ); }; -export { - ADDRESS_ICONS, - AutosuggestLocation as default, -}; +export { ADDRESS_ICONS, AutosuggestLocation as default }; diff --git a/src/components/avatar-stack.tsx b/src/components/avatar-stack.tsx index e9193d344..70d514f1e 100644 --- a/src/components/avatar-stack.tsx +++ b/src/components/avatar-stack.tsx @@ -37,4 +37,4 @@ const AvatarStack: React.FC = ({ accountIds, limit = 3 }) => { ); }; -export default AvatarStack; +export { AvatarStack as default }; diff --git a/src/components/badge.tsx b/src/components/badge.tsx index e5476ca81..2f7fad676 100644 --- a/src/components/badge.tsx +++ b/src/components/badge.tsx @@ -43,4 +43,4 @@ const Badge: React.FC = ({ title, slug, color }) => { ); }; -export default Badge; +export { Badge as default }; diff --git a/src/components/birthday-input.tsx b/src/components/birthday-input.tsx index 677eac933..8884c8507 100644 --- a/src/components/birthday-input.tsx +++ b/src/components/birthday-input.tsx @@ -126,4 +126,4 @@ const BirthdayInput: React.FC = ({ value, onChange, required }) ); }; -export default BirthdayInput; +export { BirthdayInput as default }; diff --git a/src/components/birthday-panel.tsx b/src/components/birthday-panel.tsx index f1f31d94e..c962b1834 100644 --- a/src/components/birthday-panel.tsx +++ b/src/components/birthday-panel.tsx @@ -65,4 +65,4 @@ const BirthdayPanel = ({ limit }: IBirthdayPanel) => { ); }; -export default BirthdayPanel; +export { BirthdayPanel as default }; diff --git a/src/components/blurhash.tsx b/src/components/blurhash.tsx index c492b0e05..76a058b69 100644 --- a/src/components/blurhash.tsx +++ b/src/components/blurhash.tsx @@ -21,7 +21,7 @@ interface IBlurhash { * Renders a blurhash in a canvas element. * @see {@link https://blurha.sh/} */ -const Blurhash: React.FC = ({ +const Blurhash: React.FC = React.memo(({ hash, width = 32, height = width, @@ -54,6 +54,6 @@ const Blurhash: React.FC = ({ return ( ); -}; +}); -export default React.memo(Blurhash); +export { Blurhash as default }; diff --git a/src/components/copyable-input.tsx b/src/components/copyable-input.tsx index 90089927c..dfa8af73d 100644 --- a/src/components/copyable-input.tsx +++ b/src/components/copyable-input.tsx @@ -51,4 +51,4 @@ const CopyableInput: React.FC = ({ value, type = 'text', onCopy ); }; -export default CopyableInput; +export { CopyableInput as default }; diff --git a/src/components/domain.tsx b/src/components/domain.tsx index 2b2d25bea..379c74574 100644 --- a/src/components/domain.tsx +++ b/src/components/domain.tsx @@ -43,4 +43,4 @@ const Domain: React.FC = ({ domain }) => { ); }; -export default Domain; +export { Domain as default }; diff --git a/src/components/dropdown-menu/dropdown-menu-item.tsx b/src/components/dropdown-menu/dropdown-menu-item.tsx index 8252a6dd4..61cf054d5 100644 --- a/src/components/dropdown-menu/dropdown-menu-item.tsx +++ b/src/components/dropdown-menu/dropdown-menu-item.tsx @@ -4,7 +4,7 @@ import { useHistory } from 'react-router-dom'; import { Counter, Icon } from '../ui'; -export interface MenuItem { +interface MenuItem { action?: React.EventHandler; active?: boolean; count?: number; @@ -106,4 +106,4 @@ const DropdownMenuItem = ({ index, item, onClick }: IDropdownMenuItem) => { ); }; -export default DropdownMenuItem; +export { type MenuItem, DropdownMenuItem as default }; diff --git a/src/components/dropdown-menu/dropdown-menu.tsx b/src/components/dropdown-menu/dropdown-menu.tsx index 3c7d02a4c..3c888cf53 100644 --- a/src/components/dropdown-menu/dropdown-menu.tsx +++ b/src/components/dropdown-menu/dropdown-menu.tsx @@ -15,7 +15,7 @@ import DropdownMenuItem, { MenuItem } from './dropdown-menu-item'; import type { Status } from 'soapbox/types/entities'; -export type Menu = Array; +type Menu = Array; interface IDropdownMenu { children?: React.ReactElement; @@ -326,4 +326,4 @@ const DropdownMenu = (props: IDropdownMenu) => { ); }; -export default DropdownMenu; +export { type Menu, DropdownMenu as default }; diff --git a/src/components/dropdown-menu/index.ts b/src/components/dropdown-menu/index.ts index 014166d01..6adc0efc3 100644 --- a/src/components/dropdown-menu/index.ts +++ b/src/components/dropdown-menu/index.ts @@ -1,3 +1,2 @@ -export { default } from './dropdown-menu'; -export type { Menu } from './dropdown-menu'; +export { default, type Menu } from './dropdown-menu'; export type { MenuItem } from './dropdown-menu-item'; \ No newline at end of file diff --git a/src/components/event-preview.tsx b/src/components/event-preview.tsx index 5ef36a4d5..d2e3de706 100644 --- a/src/components/event-preview.tsx +++ b/src/components/event-preview.tsx @@ -90,4 +90,4 @@ const EventPreview: React.FC = ({ status, className, hideAction, ); }; -export default EventPreview; +export { EventPreview as default }; diff --git a/src/components/extended-video-player.tsx b/src/components/extended-video-player.tsx index 2b4ad8b0e..b02382f7f 100644 --- a/src/components/extended-video-player.tsx +++ b/src/components/extended-video-player.tsx @@ -61,4 +61,4 @@ const ExtendedVideoPlayer: React.FC = ({ src, alt, time, c ); }; -export default ExtendedVideoPlayer; +export { ExtendedVideoPlayer as default }; diff --git a/src/components/fork-awesome-icon.tsx b/src/components/fork-awesome-icon.tsx index 09d5c8edb..be72ffb24 100644 --- a/src/components/fork-awesome-icon.tsx +++ b/src/components/fork-awesome-icon.tsx @@ -8,7 +8,7 @@ import clsx from 'clsx'; import React from 'react'; -export interface IForkAwesomeIcon extends React.HTMLAttributes { +interface IForkAwesomeIcon extends React.HTMLAttributes { id: string; className?: string; fixedWidth?: boolean; @@ -31,4 +31,4 @@ const ForkAwesomeIcon: React.FC = ({ id, className, fixedWidth ); }; -export default ForkAwesomeIcon; +export { type IForkAwesomeIcon, ForkAwesomeIcon as default }; diff --git a/src/components/gdpr-banner.tsx b/src/components/gdpr-banner.tsx index b793c972f..7a53ac3b1 100644 --- a/src/components/gdpr-banner.tsx +++ b/src/components/gdpr-banner.tsx @@ -61,4 +61,4 @@ const GdprBanner: React.FC = () => { ); }; -export default GdprBanner; +export { GdprBanner as default }; diff --git a/src/components/group-card.tsx b/src/components/group-card.tsx index 5ecc7e56e..2e1527716 100644 --- a/src/components/group-card.tsx +++ b/src/components/group-card.tsx @@ -51,4 +51,4 @@ const GroupCard: React.FC = ({ group }) => ( ); -export default GroupCard; +export { GroupCard as default }; diff --git a/src/components/groups/group-avatar.tsx b/src/components/groups/group-avatar.tsx index 13b40d237..99cad4f71 100644 --- a/src/components/groups/group-avatar.tsx +++ b/src/components/groups/group-avatar.tsx @@ -34,4 +34,4 @@ const GroupAvatar = (props: IGroupAvatar) => { ); }; -export default GroupAvatar; \ No newline at end of file +export { GroupAvatar as default }; \ No newline at end of file diff --git a/src/components/groups/popover/group-popover.tsx b/src/components/groups/popover/group-popover.tsx index c73f254d6..c9ecbba68 100644 --- a/src/components/groups/popover/group-popover.tsx +++ b/src/components/groups/popover/group-popover.tsx @@ -105,4 +105,4 @@ const GroupPopover = (props: IGroupPopoverContainer) => { ); }; -export default GroupPopover; \ No newline at end of file +export { GroupPopover as default }; \ No newline at end of file diff --git a/src/components/hashtag-link.tsx b/src/components/hashtag-link.tsx index a0f647a87..5aae503bd 100644 --- a/src/components/hashtag-link.tsx +++ b/src/components/hashtag-link.tsx @@ -12,4 +12,4 @@ const HashtagLink: React.FC = ({ hashtag }) => ( ); -export default HashtagLink; \ No newline at end of file +export { HashtagLink as default }; \ No newline at end of file diff --git a/src/components/hashtag.tsx b/src/components/hashtag.tsx index 1963c4f04..9771e59db 100644 --- a/src/components/hashtag.tsx +++ b/src/components/hashtag.tsx @@ -52,4 +52,4 @@ const Hashtag: React.FC = ({ hashtag }) => { ); }; -export default Hashtag; +export { Hashtag as default }; diff --git a/src/components/helmet.tsx b/src/components/helmet.tsx index b50dcb2e4..7ce54eaca 100644 --- a/src/components/helmet.tsx +++ b/src/components/helmet.tsx @@ -52,4 +52,4 @@ const Helmet: React.FC = ({ children }) => { ); }; -export default Helmet; +export { Helmet as default }; diff --git a/src/components/hover-ref-wrapper.tsx b/src/components/hover-ref-wrapper.tsx index 8d0aa1ecd..ea242c369 100644 --- a/src/components/hover-ref-wrapper.tsx +++ b/src/components/hover-ref-wrapper.tsx @@ -22,7 +22,7 @@ interface IHoverRefWrapper { } /** Makes a profile hover card appear when the wrapped element is hovered. */ -export const HoverRefWrapper: React.FC = ({ accountId, children, inline = false, className }) => { +const HoverRefWrapper: React.FC = ({ accountId, children, inline = false, className }) => { const dispatch = useAppDispatch(); const ref = useRef(null); const Elem: keyof JSX.IntrinsicElements = inline ? 'span' : 'div'; diff --git a/src/components/hover-status-wrapper.tsx b/src/components/hover-status-wrapper.tsx index 685dbf3d9..a5e9bc715 100644 --- a/src/components/hover-status-wrapper.tsx +++ b/src/components/hover-status-wrapper.tsx @@ -21,7 +21,7 @@ interface IHoverStatusWrapper { } /** Makes a status hover card appear when the wrapped element is hovered. */ -export const HoverStatusWrapper: React.FC = ({ statusId, children, inline = false, className }) => { +const HoverStatusWrapper: React.FC = ({ statusId, children, inline = false, className }) => { const dispatch = useDispatch(); const ref = useRef(null); const Elem: keyof JSX.IntrinsicElements = inline ? 'span' : 'div'; diff --git a/src/components/icon-button.tsx b/src/components/icon-button.tsx index a209aa73c..fab634aaa 100644 --- a/src/components/icon-button.tsx +++ b/src/components/icon-button.tsx @@ -97,4 +97,4 @@ const IconButton: React.FC = ({ ); }; -export default IconButton; +export { IconButton as default }; diff --git a/src/components/icon-with-counter.tsx b/src/components/icon-with-counter.tsx index 5e268c473..89bce555a 100644 --- a/src/components/icon-with-counter.tsx +++ b/src/components/icon-with-counter.tsx @@ -22,4 +22,4 @@ const IconWithCounter: React.FC = ({ icon, count, countMax, .. ); -export default IconWithCounter; +export { IconWithCounter as default }; diff --git a/src/components/icon.tsx b/src/components/icon.tsx index b197424b7..8c5ed7fdf 100644 --- a/src/components/icon.tsx +++ b/src/components/icon.tsx @@ -7,7 +7,7 @@ import clsx from 'clsx'; import React from 'react'; import InlineSVG from 'react-inlinesvg'; // eslint-disable-line no-restricted-imports -export interface IIcon extends React.HTMLAttributes { +interface IIcon extends React.HTMLAttributes { src: string; id?: string; alt?: string; @@ -26,4 +26,4 @@ const Icon: React.FC = ({ src, alt, className, ...rest }) => ( ); -export default Icon; +export { type IIcon, Icon as default }; diff --git a/src/components/landing-gradient.tsx b/src/components/landing-gradient.tsx index ed27fe214..7bf75dc11 100644 --- a/src/components/landing-gradient.tsx +++ b/src/components/landing-gradient.tsx @@ -5,4 +5,4 @@ const LandingGradient: React.FC = () => (
); -export default LandingGradient; +export { LandingGradient as default }; diff --git a/src/components/link.tsx b/src/components/link.tsx index 51bb91300..2ce0181f8 100644 --- a/src/components/link.tsx +++ b/src/components/link.tsx @@ -8,4 +8,4 @@ const Link = (props: LinkProps) => ( /> ); -export default Link; \ No newline at end of file +export { Link as default }; \ No newline at end of file diff --git a/src/components/load-gap.tsx b/src/components/load-gap.tsx index 376100fad..358712384 100644 --- a/src/components/load-gap.tsx +++ b/src/components/load-gap.tsx @@ -25,4 +25,4 @@ const LoadGap: React.FC = ({ disabled, maxId, onClick }) => { ); }; -export default LoadGap; +export { LoadGap as default }; diff --git a/src/components/load-more.tsx b/src/components/load-more.tsx index c356751b9..1cedb49b1 100644 --- a/src/components/load-more.tsx +++ b/src/components/load-more.tsx @@ -22,4 +22,4 @@ const LoadMore: React.FC = ({ onClick, disabled, visible = true, clas ); }; -export default LoadMore; +export { LoadMore as default }; diff --git a/src/components/loading-screen.tsx b/src/components/loading-screen.tsx index 9717f1c3a..35028658d 100644 --- a/src/components/loading-screen.tsx +++ b/src/components/loading-screen.tsx @@ -16,4 +16,4 @@ const LoadingScreen: React.FC = () => (
); -export default LoadingScreen; +export { LoadingScreen as default }; diff --git a/src/components/location-search.tsx b/src/components/location-search.tsx index 7a745eda8..8bea96c03 100644 --- a/src/components/location-search.tsx +++ b/src/components/location-search.tsx @@ -105,4 +105,4 @@ const LocationSearch: React.FC = ({ onSelected }) => { ); }; -export default LocationSearch; +export { LocationSearch as default }; diff --git a/src/components/markup.tsx b/src/components/markup.tsx index a1b006393..46a5c5c8e 100644 --- a/src/components/markup.tsx +++ b/src/components/markup.tsx @@ -9,4 +9,4 @@ interface IMarkup extends IText { /** Styles HTML markup returned by the API, such as in account bios and statuses. */ const Markup = React.forwardRef((props, ref) => ); -export default Markup; \ No newline at end of file +export { Markup as default }; \ No newline at end of file diff --git a/src/components/media-gallery.tsx b/src/components/media-gallery.tsx index aa831e7e2..dddc3e9bc 100644 --- a/src/components/media-gallery.tsx +++ b/src/components/media-gallery.tsx @@ -269,7 +269,7 @@ const Item: React.FC = ({ ); }; -export interface IMediaGallery { +interface IMediaGallery { sensitive?: boolean; media: ImmutableList; height?: number; @@ -566,4 +566,7 @@ const MediaGallery: React.FC = (props) => { ); }; -export default MediaGallery; +export { + type IMediaGallery, + MediaGallery as default, +}; diff --git a/src/components/mention.tsx b/src/components/mention.tsx index d8fb2c66a..e33be36e1 100644 --- a/src/components/mention.tsx +++ b/src/components/mention.tsx @@ -33,4 +33,4 @@ const Mention: React.FC = ({ mention: { acct, username }, disabled }) ); }; -export default Mention; \ No newline at end of file +export { Mention as default }; \ No newline at end of file diff --git a/src/components/missing-indicator.tsx b/src/components/missing-indicator.tsx index 69bade6c2..0adb8ec72 100644 --- a/src/components/missing-indicator.tsx +++ b/src/components/missing-indicator.tsx @@ -23,4 +23,4 @@ const MissingIndicator = ({ nested = false }: MissingIndicatorProps): JSX.Elemen ); -export default MissingIndicator; +export { MissingIndicator as default }; diff --git a/src/components/outline-box.tsx b/src/components/outline-box.tsx index a46262a5b..3d228df1e 100644 --- a/src/components/outline-box.tsx +++ b/src/components/outline-box.tsx @@ -16,4 +16,4 @@ const OutlineBox: React.FC = ({ children, className, ...rest }) => ); -export default OutlineBox; +export { OutlineBox as default }; diff --git a/src/components/polls/poll-footer.tsx b/src/components/polls/poll-footer.tsx index 402216a71..b015460a2 100644 --- a/src/components/polls/poll-footer.tsx +++ b/src/components/polls/poll-footer.tsx @@ -95,4 +95,4 @@ const PollFooter: React.FC = ({ poll, showResults, selected }): JSX ); }; -export default PollFooter; +export { PollFooter as default }; diff --git a/src/components/polls/poll-option.tsx b/src/components/polls/poll-option.tsx index f0a5520fc..fbb8985ef 100644 --- a/src/components/polls/poll-option.tsx +++ b/src/components/polls/poll-option.tsx @@ -162,4 +162,4 @@ const PollOption: React.FC = (props): JSX.Element | null => { ); }; -export default PollOption; +export { PollOption as default }; diff --git a/src/components/polls/poll.tsx b/src/components/polls/poll.tsx index 45336a05c..3f5968613 100644 --- a/src/components/polls/poll.tsx +++ b/src/components/polls/poll.tsx @@ -10,7 +10,7 @@ import { Stack, Text } from '../ui'; import PollFooter from './poll-footer'; import PollOption from './poll-option'; -export type Selected = Record; +type Selected = Record; interface IPoll { id: string; @@ -97,4 +97,4 @@ const Poll: React.FC = ({ id, status }): JSX.Element | null => { ); }; -export default Poll; +export { type Selected, Poll as default }; diff --git a/src/components/preview-card.tsx b/src/components/preview-card.tsx index 80ebc8993..1d2525a10 100644 --- a/src/components/preview-card.tsx +++ b/src/components/preview-card.tsx @@ -259,4 +259,4 @@ const trim = (text: string, len: number): string => { return text.substring(0, cut) + (text.length > len ? '…' : ''); }; -export default PreviewCard; +export { PreviewCard as default }; diff --git a/src/components/profile-hover-card.tsx b/src/components/profile-hover-card.tsx index d11bdecab..1872ef73a 100644 --- a/src/components/profile-hover-card.tsx +++ b/src/components/profile-hover-card.tsx @@ -49,7 +49,7 @@ interface IProfileHoverCard { } /** Popup profile preview that appears when hovering avatars and display names. */ -export const ProfileHoverCard: React.FC = ({ visible = true }) => { +const ProfileHoverCard: React.FC = ({ visible = true }) => { const dispatch = useAppDispatch(); const history = useHistory(); const intl = useIntl(); @@ -147,4 +147,4 @@ export const ProfileHoverCard: React.FC = ({ visible = true } ); }; -export default ProfileHoverCard; +export { ProfileHoverCard as default }; diff --git a/src/components/progress-circle.tsx b/src/components/progress-circle.tsx index 1adb3f46e..1956aa52c 100644 --- a/src/components/progress-circle.tsx +++ b/src/components/progress-circle.tsx @@ -49,4 +49,4 @@ const ProgressCircle: React.FC = ({ progress, radius = 12, stro ); }; -export default ProgressCircle; +export { ProgressCircle as default }; diff --git a/src/components/pull-to-refresh.tsx b/src/components/pull-to-refresh.tsx index 829441b37..8e06be527 100644 --- a/src/components/pull-to-refresh.tsx +++ b/src/components/pull-to-refresh.tsx @@ -41,4 +41,4 @@ const PullToRefresh: React.FC = ({ children, onRefresh, ...rest ); }; -export default PullToRefresh; +export { PullToRefresh as default }; diff --git a/src/components/quoted-status-indicator.tsx b/src/components/quoted-status-indicator.tsx index 493db5f19..792047128 100644 --- a/src/components/quoted-status-indicator.tsx +++ b/src/components/quoted-status-indicator.tsx @@ -24,4 +24,4 @@ const QuotedStatusIndicator: React.FC = ({ statusId }) = ); }; -export default QuotedStatusIndicator; +export { QuotedStatusIndicator as default }; diff --git a/src/components/quoted-status.tsx b/src/components/quoted-status.tsx index eb8acf4c8..f2f243f64 100644 --- a/src/components/quoted-status.tsx +++ b/src/components/quoted-status.tsx @@ -133,4 +133,4 @@ const QuotedStatus: React.FC = ({ status, onCancel, compose }) => ); }; -export default QuotedStatus; +export { QuotedStatus as default }; diff --git a/src/components/relative-timestamp.tsx b/src/components/relative-timestamp.tsx index c9b2780f2..af74b9232 100644 --- a/src/components/relative-timestamp.tsx +++ b/src/components/relative-timestamp.tsx @@ -16,7 +16,7 @@ const messages = defineMessages({ days_remaining: { id: 'time_remaining.days', defaultMessage: '{number, plural, one {# day} other {# days}} left' }, }); -export const dateFormatOptions: FormatDateOptions = { +const dateFormatOptions: FormatDateOptions = { hour12: true, year: 'numeric', month: 'short', @@ -66,7 +66,7 @@ const getUnitDelay = (units: string) => { } }; -export const timeAgoString = (intl: IntlShape, date: Date, now: number, year: number) => { +const timeAgoString = (intl: IntlShape, date: Date, now: number, year: number) => { const delta = now - date.getTime(); let relativeTime; @@ -124,7 +124,7 @@ interface RelativeTimestampState { } /** Displays a timestamp compared to the current time, eg "1m" for one minute ago. */ -class RelativeTimestamp extends React.Component { +const RelativeTimestamp = injectIntl(class RelativeTimestamp extends React.Component { _timer: NodeJS.Timeout | undefined; @@ -195,6 +195,10 @@ class RelativeTimestamp extends React.Component = ({ ); }; -export default SafeEmbed; +export { SafeEmbed as default }; diff --git a/src/components/scroll-top-button.tsx b/src/components/scroll-top-button.tsx index 1418edc38..4e2d815a1 100644 --- a/src/components/scroll-top-button.tsx +++ b/src/components/scroll-top-button.tsx @@ -101,4 +101,4 @@ const ScrollTopButton: React.FC = ({ ); }; -export default ScrollTopButton; +export { ScrollTopButton as default }; diff --git a/src/components/scrollable-list.tsx b/src/components/scrollable-list.tsx index 30f794992..7f6bb23f6 100644 --- a/src/components/scrollable-list.tsx +++ b/src/components/scrollable-list.tsx @@ -252,5 +252,4 @@ const ScrollableList = React.forwardRef(({ ); }); -export default ScrollableList; -export type { IScrollableList }; +export { type IScrollableList, ScrollableList as default }; diff --git a/src/components/sentry-feedback-form.tsx b/src/components/sentry-feedback-form.tsx index 1f8ba2a88..a22a06850 100644 --- a/src/components/sentry-feedback-form.tsx +++ b/src/components/sentry-feedback-form.tsx @@ -63,4 +63,4 @@ const SentryFeedbackForm: React.FC = ({ eventId }) => { ); }; -export default SentryFeedbackForm; \ No newline at end of file +export { SentryFeedbackForm as default }; \ No newline at end of file diff --git a/src/components/sidebar-menu.tsx b/src/components/sidebar-menu.tsx index 16ffe9d95..aea61f9a6 100644 --- a/src/components/sidebar-menu.tsx +++ b/src/components/sidebar-menu.tsx @@ -345,4 +345,4 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { ); }; -export default SidebarMenu; +export { SidebarMenu as default }; diff --git a/src/components/sidebar-navigation-link.tsx b/src/components/sidebar-navigation-link.tsx index 201bdd43b..4110255ed 100644 --- a/src/components/sidebar-navigation-link.tsx +++ b/src/components/sidebar-navigation-link.tsx @@ -73,4 +73,4 @@ const SidebarNavigationLink = React.forwardRef((props: ISidebarNavigationLink, r ); }); -export default SidebarNavigationLink; +export { SidebarNavigationLink as default }; diff --git a/src/components/sidebar-navigation.tsx b/src/components/sidebar-navigation.tsx index 7c81b3137..85f43e299 100644 --- a/src/components/sidebar-navigation.tsx +++ b/src/components/sidebar-navigation.tsx @@ -240,4 +240,4 @@ const SidebarNavigation = () => { ); }; -export default SidebarNavigation; +export { SidebarNavigation as default }; diff --git a/src/components/site-error-boundary.tsx b/src/components/site-error-boundary.tsx index 54d707f8b..ce2b15059 100644 --- a/src/components/site-error-boundary.tsx +++ b/src/components/site-error-boundary.tsx @@ -194,4 +194,4 @@ const SiteErrorBoundaryLink = ({ href, children }: ISiteErrorBoundaryLink) => ( ); -export default SiteErrorBoundary; +export { SiteErrorBoundary as default }; diff --git a/src/components/site-logo.tsx b/src/components/site-logo.tsx index e42d19e52..6c0147408 100644 --- a/src/components/site-logo.tsx +++ b/src/components/site-logo.tsx @@ -43,4 +43,4 @@ const SiteLogo: React.FC = ({ className, theme, ...rest }) => { ); }; -export default SiteLogo; +export { SiteLogo as default }; diff --git a/src/components/status-action-bar.tsx b/src/components/status-action-bar.tsx index dcef511f5..28a304413 100644 --- a/src/components/status-action-bar.tsx +++ b/src/components/status-action-bar.tsx @@ -752,4 +752,4 @@ const StatusActionBar: React.FC = ({ ); }; -export default StatusActionBar; +export { StatusActionBar as default }; diff --git a/src/components/status-action-button.tsx b/src/components/status-action-button.tsx index e93fde172..4c4a7d1b3 100644 --- a/src/components/status-action-button.tsx +++ b/src/components/status-action-button.tsx @@ -108,4 +108,4 @@ const StatusActionButton = React.forwardRef = ({ +const StatusContent: React.FC = React.memo(({ status, onClick, collapsable = false, @@ -187,6 +187,6 @@ const StatusContent: React.FC = ({ return <>{output}; } -}; +}); -export default React.memo(StatusContent); +export { StatusContent as default }; diff --git a/src/components/status-hover-card.tsx b/src/components/status-hover-card.tsx index 49e26b17e..c24387e41 100644 --- a/src/components/status-hover-card.tsx +++ b/src/components/status-hover-card.tsx @@ -19,7 +19,7 @@ interface IStatusHoverCard { } /** Popup status preview that appears when hovering reply to */ -export const StatusHoverCard: React.FC = ({ visible = true }) => { +const StatusHoverCard: React.FC = ({ visible = true }) => { const dispatch = useAppDispatch(); const history = useHistory(); @@ -93,4 +93,4 @@ export const StatusHoverCard: React.FC = ({ visible = true }) ); }; -export default StatusHoverCard; +export { StatusHoverCard as default }; diff --git a/src/components/status-list.tsx b/src/components/status-list.tsx index 863177e42..515f5cc9f 100644 --- a/src/components/status-list.tsx +++ b/src/components/status-list.tsx @@ -243,5 +243,4 @@ const StatusList: React.FC = ({ ); }; -export default StatusList; -export type { IStatusList }; +export { type IStatusList, StatusList as default }; diff --git a/src/components/status-media.tsx b/src/components/status-media.tsx index 8beaebf33..b26df0c60 100644 --- a/src/components/status-media.tsx +++ b/src/components/status-media.tsx @@ -135,4 +135,4 @@ const StatusMedia: React.FC = ({ } }; -export default StatusMedia; +export { StatusMedia as default }; diff --git a/src/components/status-reaction-wrapper.tsx b/src/components/status-reaction-wrapper.tsx index 546ed061a..a5a867b45 100644 --- a/src/components/status-reaction-wrapper.tsx +++ b/src/components/status-reaction-wrapper.tsx @@ -118,4 +118,4 @@ const StatusReactionWrapper: React.FC = ({ statusId, chi ); }; -export default StatusReactionWrapper; +export { StatusReactionWrapper as default }; diff --git a/src/components/status-reply-mentions.tsx b/src/components/status-reply-mentions.tsx index e3bee8237..621ba9688 100644 --- a/src/components/status-reply-mentions.tsx +++ b/src/components/status-reply-mentions.tsx @@ -110,4 +110,4 @@ const StatusReplyMentions: React.FC = ({ status, hoverable ); }; -export default StatusReplyMentions; +export { StatusReplyMentions as default }; diff --git a/src/components/status.tsx b/src/components/status.tsx index 830e7b9e5..059d01fe2 100644 --- a/src/components/status.tsx +++ b/src/components/status.tsx @@ -28,13 +28,13 @@ import { Card, Icon, Stack, Text } from './ui'; import type { Status as StatusEntity } from 'soapbox/types/entities'; // Defined in components/scrollable-list -export type ScrollPosition = { height: number; top: number }; +type ScrollPosition = { height: number; top: number }; const messages = defineMessages({ reblogged_by: { id: 'status.reblogged_by', defaultMessage: '{name} reposted' }, }); -export interface IStatus { +interface IStatus { id?: string; avatarSize?: number; status: StatusEntity; @@ -484,4 +484,8 @@ const Status: React.FC = (props) => { ); }; -export default Status; +export { + type ScrollPosition, + type IStatus, + Status as default, +}; diff --git a/src/components/statuses/sensitive-content-overlay.tsx b/src/components/statuses/sensitive-content-overlay.tsx index d18dd4d8f..e856a7b52 100644 --- a/src/components/statuses/sensitive-content-overlay.tsx +++ b/src/components/statuses/sensitive-content-overlay.tsx @@ -103,4 +103,4 @@ const SensitiveContentOverlay = React.forwardRef { ); }; -export default StatusInfo; \ No newline at end of file +export { StatusInfo as default }; \ No newline at end of file diff --git a/src/components/still-image.tsx b/src/components/still-image.tsx index c58f5da3b..c1d1f5fe7 100644 --- a/src/components/still-image.tsx +++ b/src/components/still-image.tsx @@ -3,7 +3,7 @@ import React, { useRef } from 'react'; import { useSettings } from 'soapbox/hooks'; -export interface IStillImage { +interface IStillImage { /** Image alt text. */ alt?: string; /** Extra class names for the outer
container. */ @@ -92,4 +92,7 @@ const ExtensionBadge: React.FC = ({ ext }) => (
); -export default StillImage; +export { + type IStillImage, + StillImage as default, +}; diff --git a/src/components/thumb-navigation-link.tsx b/src/components/thumb-navigation-link.tsx index 72dba7ebd..d5db818ed 100644 --- a/src/components/thumb-navigation-link.tsx +++ b/src/components/thumb-navigation-link.tsx @@ -72,4 +72,4 @@ const ThumbNavigationLink: React.FC = ({ count, countMax, ); }; -export default ThumbNavigationLink; +export { ThumbNavigationLink as default }; diff --git a/src/components/thumb-navigation.tsx b/src/components/thumb-navigation.tsx index 14873b8e2..44fb625d3 100644 --- a/src/components/thumb-navigation.tsx +++ b/src/components/thumb-navigation.tsx @@ -96,4 +96,4 @@ const ThumbNavigation: React.FC = (): JSX.Element => { ); }; -export default ThumbNavigation; +export { ThumbNavigation as default }; diff --git a/src/components/tombstone.tsx b/src/components/tombstone.tsx index faaa84ee0..228a7c8cc 100644 --- a/src/components/tombstone.tsx +++ b/src/components/tombstone.tsx @@ -35,4 +35,4 @@ const Tombstone: React.FC = ({ id, onMoveUp, onMoveDown }) => { ); }; -export default Tombstone; +export { Tombstone as default }; diff --git a/src/components/translate-button.tsx b/src/components/translate-button.tsx index 57752ec28..68c7d64c9 100644 --- a/src/components/translate-button.tsx +++ b/src/components/translate-button.tsx @@ -76,4 +76,4 @@ const TranslateButton: React.FC = ({ status }) => { ); }; -export default TranslateButton; +export { TranslateButton as default }; diff --git a/src/components/ui/accordion/accordion.tsx b/src/components/ui/accordion/accordion.tsx index efaa02a69..4e56511e0 100644 --- a/src/components/ui/accordion/accordion.tsx +++ b/src/components/ui/accordion/accordion.tsx @@ -92,4 +92,4 @@ const Accordion: React.FC = ({ headline, children, menu, expanded = ); }; -export default Accordion; +export { Accordion as default }; diff --git a/src/components/ui/banner/banner.tsx b/src/components/ui/banner/banner.tsx index 94d44ff7f..d5af88779 100644 --- a/src/components/ui/banner/banner.tsx +++ b/src/components/ui/banner/banner.tsx @@ -22,4 +22,4 @@ const Banner: React.FC = ({ theme, children, className }) => ( ); -export default Banner; +export { Banner as default }; diff --git a/src/components/ui/card/card.tsx b/src/components/ui/card/card.tsx index a4bb389a1..bcf3a1c12 100644 --- a/src/components/ui/card/card.tsx +++ b/src/components/ui/card/card.tsx @@ -18,7 +18,7 @@ const messages = defineMessages({ back: { id: 'card.back.label', defaultMessage: 'Back' }, }); -export type CardSizes = keyof typeof sizes +type CardSizes = keyof typeof sizes interface ICard { /** The type of card. */ @@ -108,4 +108,4 @@ const CardBody: React.FC = ({ className, children }): JSX.Element =>
{children}
); -export { Card, CardHeader, CardTitle, CardBody }; +export { type CardSizes, Card, CardHeader, CardTitle, CardBody }; diff --git a/src/components/ui/carousel/carousel.tsx b/src/components/ui/carousel/carousel.tsx index 0bece264c..0f5b781f3 100644 --- a/src/components/ui/carousel/carousel.tsx +++ b/src/components/ui/carousel/carousel.tsx @@ -109,4 +109,4 @@ const Carousel: React.FC = (props): JSX.Element => { ); }; -export default Carousel; \ No newline at end of file +export { Carousel as default }; \ No newline at end of file diff --git a/src/components/ui/checkbox/checkbox.tsx b/src/components/ui/checkbox/checkbox.tsx index 333b946d7..e7d096390 100644 --- a/src/components/ui/checkbox/checkbox.tsx +++ b/src/components/ui/checkbox/checkbox.tsx @@ -12,4 +12,4 @@ const Checkbox = React.forwardRef((props, ref) => ( /> )); -export default Checkbox; +export { Checkbox as default }; diff --git a/src/components/ui/column/column.tsx b/src/components/ui/column/column.tsx index 2b5bed45c..9f0b85484 100644 --- a/src/components/ui/column/column.tsx +++ b/src/components/ui/column/column.tsx @@ -40,7 +40,7 @@ const ColumnHeader: React.FC = ({ label, backHref, className, act ); }; -export interface IColumn { +interface IColumn { /** Route the back button goes to. */ backHref?: string; /** Column title text. */ @@ -120,6 +120,7 @@ const Column: React.FC = React.forwardRef((props, ref: React.ForwardedR }); export { + type IColumn, Column, ColumnHeader, }; diff --git a/src/components/ui/counter/counter.tsx b/src/components/ui/counter/counter.tsx index 3b73028c8..6083e0de2 100644 --- a/src/components/ui/counter/counter.tsx +++ b/src/components/ui/counter/counter.tsx @@ -16,4 +16,4 @@ const Counter: React.FC = ({ count, countMax }) => ( ); -export default Counter; +export { Counter as default }; diff --git a/src/components/ui/datepicker/datepicker.tsx b/src/components/ui/datepicker/datepicker.tsx index 18298a4aa..2b3e27e0a 100644 --- a/src/components/ui/datepicker/datepicker.tsx +++ b/src/components/ui/datepicker/datepicker.tsx @@ -89,4 +89,4 @@ const Datepicker = ({ onChange }: IDatepicker) => { ); }; -export default Datepicker; +export { Datepicker as default }; diff --git a/src/components/ui/divider/divider.tsx b/src/components/ui/divider/divider.tsx index 3e7d21f80..db50f4f65 100644 --- a/src/components/ui/divider/divider.tsx +++ b/src/components/ui/divider/divider.tsx @@ -26,4 +26,4 @@ const Divider = ({ text, textSize = 'md' }: IDivider) => ( ); -export default Divider; +export { Divider as default }; diff --git a/src/components/ui/emoji-selector/emoji-selector.tsx b/src/components/ui/emoji-selector/emoji-selector.tsx index 114f94d96..c7f3272f6 100644 --- a/src/components/ui/emoji-selector/emoji-selector.tsx +++ b/src/components/ui/emoji-selector/emoji-selector.tsx @@ -144,4 +144,4 @@ const EmojiSelector: React.FC = ({ ); }; -export default EmojiSelector; +export { EmojiSelector as default }; diff --git a/src/components/ui/emoji/emoji.tsx b/src/components/ui/emoji/emoji.tsx index 68c82fb03..be3aedb1e 100644 --- a/src/components/ui/emoji/emoji.tsx +++ b/src/components/ui/emoji/emoji.tsx @@ -31,4 +31,4 @@ const Emoji: React.FC = (props): JSX.Element | null => { ); }; -export default Emoji; +export { Emoji as default }; diff --git a/src/components/ui/file-input/file-input.tsx b/src/components/ui/file-input/file-input.tsx index 8fa1615e5..56d71630e 100644 --- a/src/components/ui/file-input/file-input.tsx +++ b/src/components/ui/file-input/file-input.tsx @@ -11,4 +11,4 @@ const FileInput = forwardRef((props, ref) => ( /> )); -export default FileInput; +export { FileInput as default }; diff --git a/src/components/ui/form-actions/form-actions.tsx b/src/components/ui/form-actions/form-actions.tsx index e74361c35..17da7ba5f 100644 --- a/src/components/ui/form-actions/form-actions.tsx +++ b/src/components/ui/form-actions/form-actions.tsx @@ -13,4 +13,4 @@ const FormActions: React.FC = ({ children }) => ( ); -export default FormActions; +export { FormActions as default }; diff --git a/src/components/ui/form-group/form-group.tsx b/src/components/ui/form-group/form-group.tsx index 66bfaea92..df7e2b33c 100644 --- a/src/components/ui/form-group/form-group.tsx +++ b/src/components/ui/form-group/form-group.tsx @@ -111,4 +111,4 @@ const FormGroup: React.FC = (props) => { ); }; -export default FormGroup; +export { FormGroup as default }; diff --git a/src/components/ui/form/form.tsx b/src/components/ui/form/form.tsx index b23b44b38..906d55fc3 100644 --- a/src/components/ui/form/form.tsx +++ b/src/components/ui/form/form.tsx @@ -26,4 +26,4 @@ const Form: React.FC = ({ onSubmit, children, ...filteredProps }) => { ); }; -export default Form; +export { Form as default }; diff --git a/src/components/ui/hstack/hstack.tsx b/src/components/ui/hstack/hstack.tsx index 9d39fa8cb..5e1cfc66c 100644 --- a/src/components/ui/hstack/hstack.tsx +++ b/src/components/ui/hstack/hstack.tsx @@ -70,4 +70,4 @@ const HStack = forwardRef((props, ref) => { ); }); -export default HStack; +export { HStack as default }; diff --git a/src/components/ui/icon-button/icon-button.tsx b/src/components/ui/icon-button/icon-button.tsx index 001a3ee0e..851b8b0cb 100644 --- a/src/components/ui/icon-button/icon-button.tsx +++ b/src/components/ui/icon-button/icon-button.tsx @@ -46,4 +46,4 @@ const IconButton = React.forwardRef((props: IIconButton, ref: React.ForwardedRef ); }); -export default IconButton; +export { IconButton as default }; diff --git a/src/components/ui/icon/icon.tsx b/src/components/ui/icon/icon.tsx index 688b4dca6..8cb45d0d1 100644 --- a/src/components/ui/icon/icon.tsx +++ b/src/components/ui/icon/icon.tsx @@ -37,4 +37,4 @@ const Icon: React.FC = ({ src, alt, count, size, countMax, ...filteredPro ); -export default Icon; +export { Icon as default }; diff --git a/src/components/ui/icon/svg-icon.tsx b/src/components/ui/icon/svg-icon.tsx index dcd93e113..fe880408e 100644 --- a/src/components/ui/icon/svg-icon.tsx +++ b/src/components/ui/icon/svg-icon.tsx @@ -41,4 +41,4 @@ const SvgIcon: React.FC = ({ src, alt, size = 24, className, ...filter ); }; -export default SvgIcon; +export { SvgIcon as default }; diff --git a/src/components/ui/layout/layout.tsx b/src/components/ui/layout/layout.tsx index e3d9575c3..710e3ed7e 100644 --- a/src/components/ui/layout/layout.tsx +++ b/src/components/ui/layout/layout.tsx @@ -63,4 +63,4 @@ Layout.Sidebar = Sidebar; Layout.Main = Main; Layout.Aside = Aside; -export default Layout; +export { Layout as default }; diff --git a/src/components/ui/modal/modal.tsx b/src/components/ui/modal/modal.tsx index 8747cc4f0..14891cbe0 100644 --- a/src/components/ui/modal/modal.tsx +++ b/src/components/ui/modal/modal.tsx @@ -177,4 +177,4 @@ const Modal = React.forwardRef(({ ); }); -export default Modal; +export { Modal as default }; diff --git a/src/components/ui/popover/popover.tsx b/src/components/ui/popover/popover.tsx index 86085be5d..6d68f398e 100644 --- a/src/components/ui/popover/popover.tsx +++ b/src/components/ui/popover/popover.tsx @@ -117,4 +117,4 @@ const Popover: React.FC = (props) => { ); }; -export default Popover; \ No newline at end of file +export { Popover as default }; \ No newline at end of file diff --git a/src/components/ui/portal/portal.tsx b/src/components/ui/portal/portal.tsx index 7d175628c..6901c9096 100644 --- a/src/components/ui/portal/portal.tsx +++ b/src/components/ui/portal/portal.tsx @@ -27,4 +27,4 @@ const Portal: React.FC = ({ children }) => { ); }; -export default Portal; +export { Portal as default }; diff --git a/src/components/ui/progress-bar/progress-bar.tsx b/src/components/ui/progress-bar/progress-bar.tsx index 4fffe7937..dd08f4087 100644 --- a/src/components/ui/progress-bar/progress-bar.tsx +++ b/src/components/ui/progress-bar/progress-bar.tsx @@ -30,4 +30,4 @@ const ProgressBar: React.FC = ({ progress, size = 'md' }) => ( ); -export default ProgressBar; +export { ProgressBar as default }; diff --git a/src/components/ui/radio-button/radio-button.tsx b/src/components/ui/radio-button/radio-button.tsx index 6a6829c78..654a599a1 100644 --- a/src/components/ui/radio-button/radio-button.tsx +++ b/src/components/ui/radio-button/radio-button.tsx @@ -36,4 +36,4 @@ const RadioButton: React.FC = ({ name, value, checked, onChange, l ); }; -export default RadioButton; +export { RadioButton as default }; diff --git a/src/components/ui/select/select.tsx b/src/components/ui/select/select.tsx index b74f8195e..3a163ad9b 100644 --- a/src/components/ui/select/select.tsx +++ b/src/components/ui/select/select.tsx @@ -27,4 +27,4 @@ const Select = React.forwardRef((props, ref) => { ); }); -export default Select; +export { Select as default }; diff --git a/src/components/ui/slider/slider.tsx b/src/components/ui/slider/slider.tsx index 80f4929dc..4df930ead 100644 --- a/src/components/ui/slider/slider.tsx +++ b/src/components/ui/slider/slider.tsx @@ -120,4 +120,4 @@ const getPointerPosition = (el: HTMLElement, event: MouseEvent & TouchEvent): Po }; }; -export default Slider; +export { Slider as default }; diff --git a/src/components/ui/spinner/spinner.tsx b/src/components/ui/spinner/spinner.tsx index 23341ba76..b81769da2 100644 --- a/src/components/ui/spinner/spinner.tsx +++ b/src/components/ui/spinner/spinner.tsx @@ -30,4 +30,4 @@ const Spinner = ({ size = 30, withText = true }: ISpinner) => ( ); -export default Spinner; +export { Spinner as default }; diff --git a/src/components/ui/stack/stack.tsx b/src/components/ui/stack/stack.tsx index e501d5943..7828909fa 100644 --- a/src/components/ui/stack/stack.tsx +++ b/src/components/ui/stack/stack.tsx @@ -65,4 +65,4 @@ const Stack = React.forwardRef((props, ref: React.Legacy ); }); -export default Stack; +export { Stack as default }; diff --git a/src/components/ui/streamfield/streamfield.tsx b/src/components/ui/streamfield/streamfield.tsx index 1c218e823..89abed8be 100644 --- a/src/components/ui/streamfield/streamfield.tsx +++ b/src/components/ui/streamfield/streamfield.tsx @@ -13,7 +13,7 @@ const messages = defineMessages({ }); /** Type of the inner Streamfield input component. */ -export type StreamfieldComponent = React.ComponentType<{ +type StreamfieldComponent = React.ComponentType<{ value: T; onChange: (value: T) => void; autoFocus: boolean; @@ -104,4 +104,4 @@ const Streamfield: React.FC = ({ ); }; -export default Streamfield; +export { type StreamfieldComponent, Streamfield as default }; diff --git a/src/components/ui/tabs/tabs.tsx b/src/components/ui/tabs/tabs.tsx index 3d435183e..27177d70a 100644 --- a/src/components/ui/tabs/tabs.tsx +++ b/src/components/ui/tabs/tabs.tsx @@ -102,7 +102,7 @@ const AnimatedTab: React.FC = ({ index, ...props }) => { }; /** Structure to represent a tab. */ -export type Item = { +type Item = { /** Tab text. */ text: React.ReactNode; /** Tab tooltip text. */ @@ -176,4 +176,7 @@ const Tabs = ({ items, activeItem }: ITabs) => { ); }; -export default Tabs; +export { + type Item, + Tabs as default, +}; diff --git a/src/components/ui/tag-input/tag-input.tsx b/src/components/ui/tag-input/tag-input.tsx index cc7b843d4..f41d646bb 100644 --- a/src/components/ui/tag-input/tag-input.tsx +++ b/src/components/ui/tag-input/tag-input.tsx @@ -67,4 +67,4 @@ const TagInput: React.FC = ({ tags, onChange, placeholder }) => { ); }; -export default TagInput; \ No newline at end of file +export { TagInput as default }; \ No newline at end of file diff --git a/src/components/ui/tag-input/tag.tsx b/src/components/ui/tag-input/tag.tsx index 87e012752..a0d054101 100644 --- a/src/components/ui/tag-input/tag.tsx +++ b/src/components/ui/tag-input/tag.tsx @@ -23,4 +23,4 @@ const Tag: React.FC = ({ tag, onDelete }) => ( ); -export default Tag; \ No newline at end of file +export { Tag as default }; \ No newline at end of file diff --git a/src/components/ui/text/text.tsx b/src/components/ui/text/text.tsx index 2c7a17e03..0715186ca 100644 --- a/src/components/ui/text/text.tsx +++ b/src/components/ui/text/text.tsx @@ -50,7 +50,7 @@ const families = { mono: 'font-mono', }; -export type Sizes = keyof typeof sizes +type Sizes = keyof typeof sizes type Tags = 'abbr' | 'p' | 'span' | 'pre' | 'time' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'div' | 'blockquote' type Directions = 'ltr' | 'rtl' @@ -132,6 +132,7 @@ const Text = React.forwardRef( ); export { + type Sizes, + type IText, Text as default, - IText, }; diff --git a/src/components/ui/textarea/textarea.tsx b/src/components/ui/textarea/textarea.tsx index 5a12e280b..214118225 100644 --- a/src/components/ui/textarea/textarea.tsx +++ b/src/components/ui/textarea/textarea.tsx @@ -118,4 +118,4 @@ const Textarea = React.forwardRef(({ }, ); -export default Textarea; +export { Textarea as default }; diff --git a/src/components/ui/toast/toast.tsx b/src/components/ui/toast/toast.tsx index bd6412da9..a681bb7f2 100644 --- a/src/components/ui/toast/toast.tsx +++ b/src/components/ui/toast/toast.tsx @@ -156,4 +156,4 @@ const Toast = (props: IToast) => { ); }; -export default Toast; +export { Toast as default }; diff --git a/src/components/ui/toggle/toggle.tsx b/src/components/ui/toggle/toggle.tsx index 681633069..445364328 100644 --- a/src/components/ui/toggle/toggle.tsx +++ b/src/components/ui/toggle/toggle.tsx @@ -52,4 +52,4 @@ const Toggle: React.FC = ({ id, size = 'md', name, checked = false, onC ); }; -export default Toggle; +export { Toggle as default }; diff --git a/src/components/ui/tooltip/tooltip.tsx b/src/components/ui/tooltip/tooltip.tsx index 08d270c5d..632e96aa9 100644 --- a/src/components/ui/tooltip/tooltip.tsx +++ b/src/components/ui/tooltip/tooltip.tsx @@ -91,4 +91,4 @@ const Tooltip: React.FC = (props) => { ); }; -export default Tooltip; \ No newline at end of file +export { Tooltip as default }; \ No newline at end of file diff --git a/src/components/ui/widget/widget.tsx b/src/components/ui/widget/widget.tsx index 806e06173..644240cd3 100644 --- a/src/components/ui/widget/widget.tsx +++ b/src/components/ui/widget/widget.tsx @@ -62,4 +62,4 @@ const Widget: React.FC = ({ ); -export default Widget; +export { Widget as default }; diff --git a/src/components/upload-progress.tsx b/src/components/upload-progress.tsx index 8f9eb7327..3fe06eece 100644 --- a/src/components/upload-progress.tsx +++ b/src/components/upload-progress.tsx @@ -26,4 +26,4 @@ const UploadProgress: React.FC = ({ progress }) => ( ); -export default UploadProgress; +export { UploadProgress as default }; diff --git a/src/components/upload.tsx b/src/components/upload.tsx index cd1d97827..ac97d62c0 100644 --- a/src/components/upload.tsx +++ b/src/components/upload.tsx @@ -20,7 +20,7 @@ import Motion from 'soapbox/features/ui/util/optional-motion'; import { useAppDispatch, useSettings } from 'soapbox/hooks'; import { Attachment } from 'soapbox/types/entities'; -export const MIMETYPE_ICONS: Record = { +const MIMETYPE_ICONS: Record = { 'application/x-freearc': fileZipIcon, 'application/x-bzip': fileZipIcon, 'application/x-bzip2': fileZipIcon, @@ -251,4 +251,7 @@ const Upload: React.FC = ({ ); }; -export default Upload; +export { + MIMETYPE_ICONS, + Upload as default, +}; diff --git a/src/components/verification-badge.tsx b/src/components/verification-badge.tsx index d4b3bca3f..98174f76a 100644 --- a/src/components/verification-badge.tsx +++ b/src/components/verification-badge.tsx @@ -30,4 +30,4 @@ const VerificationBadge: React.FC = ({ className }) => { ); }; -export default VerificationBadge; +export { VerificationBadge as default }; diff --git a/src/containers/account-container.tsx b/src/containers/account-container.tsx index 31500b739..c4865d016 100644 --- a/src/containers/account-container.tsx +++ b/src/containers/account-container.tsx @@ -16,4 +16,4 @@ const AccountContainer: React.FC = ({ id, withRelationship, . ); }; -export default AccountContainer; +export { AccountContainer as default }; diff --git a/src/containers/status-container.tsx b/src/containers/status-container.tsx index b29310f25..9f9e24cf2 100644 --- a/src/containers/status-container.tsx +++ b/src/containers/status-container.tsx @@ -32,4 +32,4 @@ const StatusContainer: React.FC = (props) => { } }; -export default StatusContainer; +export { StatusContainer as default }; diff --git a/src/entity-store/actions.ts b/src/entity-store/actions.ts index c60f494a3..1bdc7f269 100644 --- a/src/entity-store/actions.ts +++ b/src/entity-store/actions.ts @@ -103,6 +103,8 @@ type EntityAction = | ReturnType; export { + type DeleteEntitiesOpts, + type EntityAction, ENTITIES_IMPORT, ENTITIES_DELETE, ENTITIES_DISMISS, @@ -122,5 +124,3 @@ export { invalidateEntityList, entitiesTransaction, }; - -export type { DeleteEntitiesOpts, EntityAction }; \ No newline at end of file diff --git a/src/entity-store/reducer.ts b/src/entity-store/reducer.ts index 0f66a43e0..cf44d7bc5 100644 --- a/src/entity-store/reducer.ts +++ b/src/entity-store/reducer.ts @@ -183,5 +183,4 @@ const reducer = (state: Readonly = {}, action: EntityAction): State => { } }; -export default reducer; -export type { State }; \ No newline at end of file +export { type State, reducer as default }; \ No newline at end of file diff --git a/src/features/about/index.tsx b/src/features/about/index.tsx index 56da0776e..99510e4b9 100644 --- a/src/features/about/index.tsx +++ b/src/features/about/index.tsx @@ -75,4 +75,4 @@ const AboutPage: React.FC = () => { ); }; -export default AboutPage; +export { AboutPage as default }; diff --git a/src/features/account-gallery/components/media-item.tsx b/src/features/account-gallery/components/media-item.tsx index 1b06566b2..63439f5e5 100644 --- a/src/features/account-gallery/components/media-item.tsx +++ b/src/features/account-gallery/components/media-item.tsx @@ -131,4 +131,4 @@ const MediaItem: React.FC = ({ attachment, onOpenMedia }) => { ); }; -export default MediaItem; +export { MediaItem as default }; diff --git a/src/features/account-gallery/index.tsx b/src/features/account-gallery/index.tsx index 2156667a3..20f470e5b 100644 --- a/src/features/account-gallery/index.tsx +++ b/src/features/account-gallery/index.tsx @@ -143,4 +143,4 @@ const AccountGallery = () => { ); }; -export default AccountGallery; +export { AccountGallery as default }; diff --git a/src/features/account-timeline/components/moved-note.tsx b/src/features/account-timeline/components/moved-note.tsx index c8924cdbe..9ed0bb715 100644 --- a/src/features/account-timeline/components/moved-note.tsx +++ b/src/features/account-timeline/components/moved-note.tsx @@ -38,4 +38,4 @@ const MovedNote: React.FC = ({ from, to }) => ( ); -export default MovedNote; +export { MovedNote as default }; diff --git a/src/features/account-timeline/index.tsx b/src/features/account-timeline/index.tsx index 2af53c917..974a49ba7 100644 --- a/src/features/account-timeline/index.tsx +++ b/src/features/account-timeline/index.tsx @@ -101,4 +101,4 @@ const AccountTimeline: React.FC = ({ params, withReplies = fal ); }; -export default AccountTimeline; +export { AccountTimeline as default }; diff --git a/src/features/account/components/header.tsx b/src/features/account/components/header.tsx index 6444831ab..87f4f7153 100644 --- a/src/features/account/components/header.tsx +++ b/src/features/account/components/header.tsx @@ -654,4 +654,4 @@ const Header: React.FC = ({ account }) => { ); }; -export default Header; +export { Header as default }; diff --git a/src/features/admin/announcements.tsx b/src/features/admin/announcements.tsx index 18f0e6cb4..92267ee07 100644 --- a/src/features/admin/announcements.tsx +++ b/src/features/admin/announcements.tsx @@ -126,4 +126,4 @@ const Announcements: React.FC = () => { ); }; -export default Announcements; +export { Announcements as default }; diff --git a/src/features/admin/components/admin-tabs.tsx b/src/features/admin/components/admin-tabs.tsx index debba46a0..815291a38 100644 --- a/src/features/admin/components/admin-tabs.tsx +++ b/src/features/admin/components/admin-tabs.tsx @@ -37,4 +37,4 @@ const AdminTabs: React.FC = () => { return ; }; -export default AdminTabs; +export { AdminTabs as default }; diff --git a/src/features/admin/components/latest-accounts-panel.tsx b/src/features/admin/components/latest-accounts-panel.tsx index 0d3ce94c9..4046e7a93 100644 --- a/src/features/admin/components/latest-accounts-panel.tsx +++ b/src/features/admin/components/latest-accounts-panel.tsx @@ -50,4 +50,4 @@ const LatestAccountsPanel: React.FC = ({ limit = 5 }) => { ); }; -export default LatestAccountsPanel; +export { LatestAccountsPanel as default }; diff --git a/src/features/admin/components/registration-mode-picker.tsx b/src/features/admin/components/registration-mode-picker.tsx index 744809a32..64c0f61bf 100644 --- a/src/features/admin/components/registration-mode-picker.tsx +++ b/src/features/admin/components/registration-mode-picker.tsx @@ -71,4 +71,4 @@ const RegistrationModePicker: React.FC = () => { ); }; -export default RegistrationModePicker; +export { RegistrationModePicker as default }; diff --git a/src/features/admin/components/report-status.tsx b/src/features/admin/components/report-status.tsx index 858a25e7a..2cebfa370 100644 --- a/src/features/admin/components/report-status.tsx +++ b/src/features/admin/components/report-status.tsx @@ -62,4 +62,4 @@ const ReportStatus: React.FC = ({ status }) => { ); }; -export default ReportStatus; +export { ReportStatus as default }; diff --git a/src/features/admin/components/report.tsx b/src/features/admin/components/report.tsx index e56181ced..f16f69fdc 100644 --- a/src/features/admin/components/report.tsx +++ b/src/features/admin/components/report.tsx @@ -153,4 +153,4 @@ const Report: React.FC = ({ id }) => { ); }; -export default Report; +export { Report as default }; diff --git a/src/features/admin/components/unapproved-account.tsx b/src/features/admin/components/unapproved-account.tsx index 1b9d6d6d3..69ad11224 100644 --- a/src/features/admin/components/unapproved-account.tsx +++ b/src/features/admin/components/unapproved-account.tsx @@ -44,4 +44,4 @@ const UnapprovedAccount: React.FC = ({ accountId }) => { ); }; -export default UnapprovedAccount; +export { UnapprovedAccount as default }; diff --git a/src/features/admin/domains.tsx b/src/features/admin/domains.tsx index e2455f3f8..faa03e3d7 100644 --- a/src/features/admin/domains.tsx +++ b/src/features/admin/domains.tsx @@ -145,4 +145,4 @@ const Domains: React.FC = () => { ); }; -export default Domains; +export { Domains as default }; diff --git a/src/features/admin/index.tsx b/src/features/admin/index.tsx index c8286b393..838bb810e 100644 --- a/src/features/admin/index.tsx +++ b/src/features/admin/index.tsx @@ -33,4 +33,4 @@ const Admin: React.FC = () => { ); }; -export default Admin; +export { Admin as default }; diff --git a/src/features/admin/moderation-log.tsx b/src/features/admin/moderation-log.tsx index 895d871d3..590bf430e 100644 --- a/src/features/admin/moderation-log.tsx +++ b/src/features/admin/moderation-log.tsx @@ -69,4 +69,4 @@ const LogItem: React.FC = ({ log }) => ( ); -export default ModerationLog; +export { ModerationLog as default }; diff --git a/src/features/admin/relays.tsx b/src/features/admin/relays.tsx index e3d06a9ba..3aa288976 100644 --- a/src/features/admin/relays.tsx +++ b/src/features/admin/relays.tsx @@ -136,4 +136,4 @@ const Relays: React.FC = () => { ); }; -export default Relays; +export { Relays as default }; diff --git a/src/features/admin/rules.tsx b/src/features/admin/rules.tsx index e4b9754e5..67bca8494 100644 --- a/src/features/admin/rules.tsx +++ b/src/features/admin/rules.tsx @@ -108,4 +108,4 @@ const Rules: React.FC = () => { ); }; -export default Rules; +export { Rules as default }; diff --git a/src/features/admin/tabs/awaiting-approval.tsx b/src/features/admin/tabs/awaiting-approval.tsx index 1b2d0c6a6..a72f07200 100644 --- a/src/features/admin/tabs/awaiting-approval.tsx +++ b/src/features/admin/tabs/awaiting-approval.tsx @@ -44,4 +44,4 @@ const AwaitingApproval: React.FC = () => { ); }; -export default AwaitingApproval; +export { AwaitingApproval as default }; diff --git a/src/features/admin/tabs/dashboard.tsx b/src/features/admin/tabs/dashboard.tsx index cad486771..d7931f94b 100644 --- a/src/features/admin/tabs/dashboard.tsx +++ b/src/features/admin/tabs/dashboard.tsx @@ -187,4 +187,4 @@ const Dashboard: React.FC = () => { ); }; -export default Dashboard; +export { Dashboard as default }; diff --git a/src/features/admin/tabs/reports.tsx b/src/features/admin/tabs/reports.tsx index 63ea4bd70..60474dddd 100644 --- a/src/features/admin/tabs/reports.tsx +++ b/src/features/admin/tabs/reports.tsx @@ -42,4 +42,4 @@ const Reports: React.FC = () => { ); }; -export default Reports; +export { Reports as default }; diff --git a/src/features/admin/user-index.tsx b/src/features/admin/user-index.tsx index 06dcde6e6..7df016276 100644 --- a/src/features/admin/user-index.tsx +++ b/src/features/admin/user-index.tsx @@ -66,4 +66,4 @@ const UserIndex: React.FC = () => { ); }; -export default UserIndex; +export { UserIndex as default }; diff --git a/src/features/aliases/components/account.tsx b/src/features/aliases/components/account.tsx index 036dde092..e50fb7dcf 100644 --- a/src/features/aliases/components/account.tsx +++ b/src/features/aliases/components/account.tsx @@ -51,4 +51,4 @@ const Account: React.FC = ({ accountId, aliases }) => { ); }; -export default Account; +export { Account as default }; diff --git a/src/features/aliases/components/search.tsx b/src/features/aliases/components/search.tsx index dcb995253..6a833c677 100644 --- a/src/features/aliases/components/search.tsx +++ b/src/features/aliases/components/search.tsx @@ -61,4 +61,4 @@ const Search: React.FC = () => { ); }; -export default Search; +export { Search as default }; diff --git a/src/features/aliases/index.tsx b/src/features/aliases/index.tsx index e4bbb10d2..99f72188a 100644 --- a/src/features/aliases/index.tsx +++ b/src/features/aliases/index.tsx @@ -90,4 +90,4 @@ const Aliases = () => { ); }; -export default Aliases; +export { Aliases as default }; diff --git a/src/features/audio/index.tsx b/src/features/audio/index.tsx index 4d45177ec..07288ce68 100644 --- a/src/features/audio/index.tsx +++ b/src/features/audio/index.tsx @@ -564,4 +564,4 @@ const Audio: React.FC = (props) => { ); }; -export default Audio; +export { Audio as default }; diff --git a/src/features/audio/visualizer.ts b/src/features/audio/visualizer.ts index 541b6210b..8e446a8d0 100644 --- a/src/features/audio/visualizer.ts +++ b/src/features/audio/visualizer.ts @@ -13,7 +13,7 @@ const hex2rgba = (hex: string, alpha = 1) => { return `rgba(${r}, ${g}, ${b}, ${alpha})`; }; -export default class Visualizer { +class Visualizer { tickSize: number; canvas?: HTMLCanvasElement; @@ -139,3 +139,5 @@ export default class Visualizer { } } + +export { Visualizer as default }; diff --git a/src/features/auth-login/components/consumer-button.tsx b/src/features/auth-login/components/consumer-button.tsx index feac5f75b..d598cac49 100644 --- a/src/features/auth-login/components/consumer-button.tsx +++ b/src/features/auth-login/components/consumer-button.tsx @@ -48,4 +48,4 @@ const ConsumerButton: React.FC = ({ provider }) => { ); }; -export default ConsumerButton; +export { ConsumerButton as default }; diff --git a/src/features/auth-login/components/consumers-list.tsx b/src/features/auth-login/components/consumers-list.tsx index e944c76c3..631b6efac 100644 --- a/src/features/auth-login/components/consumers-list.tsx +++ b/src/features/auth-login/components/consumers-list.tsx @@ -32,4 +32,4 @@ const ConsumersList: React.FC = () => { } }; -export default ConsumersList; +export { ConsumersList as default }; diff --git a/src/features/auth-login/components/login-form.tsx b/src/features/auth-login/components/login-form.tsx index 21e353d31..48c35ef35 100644 --- a/src/features/auth-login/components/login-form.tsx +++ b/src/features/auth-login/components/login-form.tsx @@ -82,4 +82,4 @@ const LoginForm: React.FC = ({ isLoading, handleSubmit }) => { ); }; -export default LoginForm; +export { LoginForm as default }; diff --git a/src/features/auth-login/components/login-page.tsx b/src/features/auth-login/components/login-page.tsx index ba2ef7fcd..e2dc25edb 100644 --- a/src/features/auth-login/components/login-page.tsx +++ b/src/features/auth-login/components/login-page.tsx @@ -91,4 +91,4 @@ const LoginPage = () => { ); }; -export default LoginPage; +export { LoginPage as default }; diff --git a/src/features/auth-login/components/logout.tsx b/src/features/auth-login/components/logout.tsx index 6f70e0bdd..bb02f5e80 100644 --- a/src/features/auth-login/components/logout.tsx +++ b/src/features/auth-login/components/logout.tsx @@ -23,4 +23,4 @@ const Logout: React.FC = () => { } }; -export default Logout; +export { Logout as default }; diff --git a/src/features/auth-login/components/otp-auth-form.tsx b/src/features/auth-login/components/otp-auth-form.tsx index f988a93fe..25e2169fa 100644 --- a/src/features/auth-login/components/otp-auth-form.tsx +++ b/src/features/auth-login/components/otp-auth-form.tsx @@ -78,4 +78,4 @@ const OtpAuthForm: React.FC = ({ mfa_token }) => { ); }; -export default OtpAuthForm; +export { OtpAuthForm as default }; diff --git a/src/features/auth-login/components/password-reset.tsx b/src/features/auth-login/components/password-reset.tsx index 42a8c4bc6..543e13814 100644 --- a/src/features/auth-login/components/password-reset.tsx +++ b/src/features/auth-login/components/password-reset.tsx @@ -58,4 +58,4 @@ const PasswordReset = () => { ); }; -export default PasswordReset; +export { PasswordReset as default }; diff --git a/src/features/auth-login/components/registration-form.tsx b/src/features/auth-login/components/registration-form.tsx index 8bf9854fc..3795b3175 100644 --- a/src/features/auth-login/components/registration-form.tsx +++ b/src/features/auth-login/components/registration-form.tsx @@ -372,4 +372,4 @@ const RegistrationForm: React.FC = ({ inviteToken }) => { ); }; -export default RegistrationForm; +export { RegistrationForm as default }; diff --git a/src/features/auth-login/components/registration-page.tsx b/src/features/auth-login/components/registration-page.tsx index eee006888..99f21319e 100644 --- a/src/features/auth-login/components/registration-page.tsx +++ b/src/features/auth-login/components/registration-page.tsx @@ -32,4 +32,4 @@ const RegistrationPage: React.FC = () => { ); }; -export default RegistrationPage; \ No newline at end of file +export { RegistrationPage as default }; \ No newline at end of file diff --git a/src/features/auth-token-list/index.tsx b/src/features/auth-token-list/index.tsx index 40ca864c5..2a4478a41 100644 --- a/src/features/auth-token-list/index.tsx +++ b/src/features/auth-token-list/index.tsx @@ -106,4 +106,4 @@ const AuthTokenList: React.FC = () => { ); }; -export default AuthTokenList; +export { AuthTokenList as default }; diff --git a/src/features/backups/index.tsx b/src/features/backups/index.tsx index 9cac7cb13..7f45a4113 100644 --- a/src/features/backups/index.tsx +++ b/src/features/backups/index.tsx @@ -107,4 +107,4 @@ const Backups = () => { ); }; -export default Backups; +export { Backups as default }; diff --git a/src/features/birthdays/account.tsx b/src/features/birthdays/account.tsx index 33d14cf1b..2863fbe9e 100644 --- a/src/features/birthdays/account.tsx +++ b/src/features/birthdays/account.tsx @@ -43,4 +43,4 @@ const Account: React.FC = ({ accountId }) => { ); }; -export default Account; +export { Account as default }; diff --git a/src/features/birthdays/date-picker.ts b/src/features/birthdays/date-picker.ts index 1944067d7..9a4845be4 100644 --- a/src/features/birthdays/date-picker.ts +++ b/src/features/birthdays/date-picker.ts @@ -1,4 +1,4 @@ import DatePicker from 'react-datepicker'; import 'react-datepicker/dist/react-datepicker.css'; -export default DatePicker; +export { DatePicker as default }; diff --git a/src/features/blocks/index.tsx b/src/features/blocks/index.tsx index f5bedf96c..6a00ea0ac 100644 --- a/src/features/blocks/index.tsx +++ b/src/features/blocks/index.tsx @@ -48,4 +48,4 @@ const Blocks: React.FC = () => { ); }; -export default Blocks; +export { Blocks as default }; diff --git a/src/features/bookmark-folders/components/new-folder-form.tsx b/src/features/bookmark-folders/components/new-folder-form.tsx index badd6006f..83466fd42 100644 --- a/src/features/bookmark-folders/components/new-folder-form.tsx +++ b/src/features/bookmark-folders/components/new-folder-form.tsx @@ -61,4 +61,4 @@ const NewFolderForm: React.FC = () => { ); }; -export default NewFolderForm; +export { NewFolderForm as default }; diff --git a/src/features/bookmark-folders/index.tsx b/src/features/bookmark-folders/index.tsx index 0e3427bc7..41defaa78 100644 --- a/src/features/bookmark-folders/index.tsx +++ b/src/features/bookmark-folders/index.tsx @@ -69,4 +69,4 @@ const BookmarkFolders: React.FC = () => { ); }; -export default BookmarkFolders; +export { BookmarkFolders as default }; diff --git a/src/features/bookmarks/index.tsx b/src/features/bookmarks/index.tsx index 5c7f7b41e..7c9b9b761 100644 --- a/src/features/bookmarks/index.tsx +++ b/src/features/bookmarks/index.tsx @@ -120,4 +120,4 @@ const Bookmarks: React.FC = ({ params }) => { ); }; -export default Bookmarks; +export { Bookmarks as default }; diff --git a/src/features/chats/components/chat-composer.tsx b/src/features/chats/components/chat-composer.tsx index 62c506f5a..ed63f426f 100644 --- a/src/features/chats/components/chat-composer.tsx +++ b/src/features/chats/components/chat-composer.tsx @@ -257,4 +257,4 @@ const ChatComposer = React.forwardRef ); }); -export default ChatComposer; +export { ChatComposer as default }; diff --git a/src/features/chats/components/chat-list-item.tsx b/src/features/chats/components/chat-list-item.tsx index 3988cca46..cec30153a 100644 --- a/src/features/chats/components/chat-list-item.tsx +++ b/src/features/chats/components/chat-list-item.tsx @@ -157,4 +157,4 @@ const ChatListItem: React.FC = ({ chat, onClick }) => { ); }; -export default ChatListItem; +export { ChatListItem as default }; diff --git a/src/features/chats/components/chat-list.tsx b/src/features/chats/components/chat-list.tsx index 5b0bd8ef4..fde923722 100644 --- a/src/features/chats/components/chat-list.tsx +++ b/src/features/chats/components/chat-list.tsx @@ -85,4 +85,4 @@ const ChatList: React.FC = ({ onClickChat, useWindowScroll = false }) ); }; -export default ChatList; +export { ChatList as default }; diff --git a/src/features/chats/components/chat-message-list.tsx b/src/features/chats/components/chat-message-list.tsx index c30766638..d6bad1620 100644 --- a/src/features/chats/components/chat-message-list.tsx +++ b/src/features/chats/components/chat-message-list.tsx @@ -263,4 +263,4 @@ const ChatMessageList: React.FC = ({ chat }) => { ); }; -export default ChatMessageList; +export { ChatMessageList as default }; diff --git a/src/features/chats/components/chat-message.tsx b/src/features/chats/components/chat-message.tsx index a92c1a674..bf712941d 100644 --- a/src/features/chats/components/chat-message.tsx +++ b/src/features/chats/components/chat-message.tsx @@ -278,4 +278,4 @@ const ChatMessage = (props: IChatMessage) => { ); }; -export default ChatMessage; +export { ChatMessage as default }; diff --git a/src/features/chats/components/chat-page/chat-page.tsx b/src/features/chats/components/chat-page/chat-page.tsx index 178607898..ab6bc2de2 100644 --- a/src/features/chats/components/chat-page/chat-page.tsx +++ b/src/features/chats/components/chat-page/chat-page.tsx @@ -91,4 +91,4 @@ const ChatPage: React.FC = ({ chatId }) => { ); }; -export default ChatPage; +export { ChatPage as default }; diff --git a/src/features/chats/components/chat-page/components/blankslate-empty.tsx b/src/features/chats/components/chat-page/components/blankslate-empty.tsx index 18f177f24..d3fa20962 100644 --- a/src/features/chats/components/chat-page/components/blankslate-empty.tsx +++ b/src/features/chats/components/chat-page/components/blankslate-empty.tsx @@ -43,4 +43,4 @@ const BlankslateEmpty: React.FC = () => { ); }; -export default BlankslateEmpty; \ No newline at end of file +export { BlankslateEmpty as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat-page/components/blankslate-with-chats.tsx b/src/features/chats/components/chat-page/components/blankslate-with-chats.tsx index 956672a19..524af4f16 100644 --- a/src/features/chats/components/chat-page/components/blankslate-with-chats.tsx +++ b/src/features/chats/components/chat-page/components/blankslate-with-chats.tsx @@ -40,4 +40,4 @@ const BlankslateWithChats = () => { ); }; -export default BlankslateWithChats; \ No newline at end of file +export { BlankslateWithChats as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat-page/components/chat-page-main.tsx b/src/features/chats/components/chat-page/components/chat-page-main.tsx index 8be27ebe3..59c4a6d60 100644 --- a/src/features/chats/components/chat-page/components/chat-page-main.tsx +++ b/src/features/chats/components/chat-page/components/chat-page-main.tsx @@ -187,4 +187,4 @@ const ChatPageMain = () => { ); }; -export default ChatPageMain; +export { ChatPageMain as default }; diff --git a/src/features/chats/components/chat-page/components/chat-page-new.tsx b/src/features/chats/components/chat-page/components/chat-page-new.tsx index 0c7fa0a60..f53d4ad1f 100644 --- a/src/features/chats/components/chat-page/components/chat-page-new.tsx +++ b/src/features/chats/components/chat-page/components/chat-page-new.tsx @@ -37,4 +37,4 @@ const ChatPageNew: React.FC = () => { ); }; -export default ChatPageNew; +export { ChatPageNew as default }; diff --git a/src/features/chats/components/chat-page/components/chat-page-settings.tsx b/src/features/chats/components/chat-page/components/chat-page-settings.tsx index 6170074ae..7a7a890c8 100644 --- a/src/features/chats/components/chat-page/components/chat-page-settings.tsx +++ b/src/features/chats/components/chat-page/components/chat-page-settings.tsx @@ -90,4 +90,4 @@ const ChatPageSettings = () => { ); }; -export default ChatPageSettings; \ No newline at end of file +export { ChatPageSettings as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat-page/components/chat-page-sidebar.tsx b/src/features/chats/components/chat-page/components/chat-page-sidebar.tsx index da1a86905..0f9e81ff3 100644 --- a/src/features/chats/components/chat-page/components/chat-page-sidebar.tsx +++ b/src/features/chats/components/chat-page/components/chat-page-sidebar.tsx @@ -56,4 +56,4 @@ const ChatPageSidebar = () => { ); }; -export default ChatPageSidebar; \ No newline at end of file +export { ChatPageSidebar as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat-pane/blankslate.tsx b/src/features/chats/components/chat-pane/blankslate.tsx index d718ff376..01d4d01cc 100644 --- a/src/features/chats/components/chat-pane/blankslate.tsx +++ b/src/features/chats/components/chat-pane/blankslate.tsx @@ -44,4 +44,4 @@ const Blankslate = ({ onSearch }: IBlankslate) => { ); }; -export default Blankslate; +export { Blankslate as default }; diff --git a/src/features/chats/components/chat-pane/chat-pane.tsx b/src/features/chats/components/chat-pane/chat-pane.tsx index 03e4b0555..fc3f82e4a 100644 --- a/src/features/chats/components/chat-pane/chat-pane.tsx +++ b/src/features/chats/components/chat-pane/chat-pane.tsx @@ -91,4 +91,4 @@ const ChatPane = () => { ); }; -export default ChatPane; +export { ChatPane as default }; diff --git a/src/features/chats/components/chat-pending-upload.tsx b/src/features/chats/components/chat-pending-upload.tsx index 52e1f689f..338bdc362 100644 --- a/src/features/chats/components/chat-pending-upload.tsx +++ b/src/features/chats/components/chat-pending-upload.tsx @@ -13,4 +13,4 @@ const ChatPendingUpload: React.FC = ({ progress }) => ( ); -export default ChatPendingUpload; \ No newline at end of file +export { ChatPendingUpload as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat-search/blankslate.tsx b/src/features/chats/components/chat-search/blankslate.tsx index f4ffd748b..8c8ee0c17 100644 --- a/src/features/chats/components/chat-search/blankslate.tsx +++ b/src/features/chats/components/chat-search/blankslate.tsx @@ -23,4 +23,4 @@ const Blankslate = () => { ); }; -export default Blankslate; \ No newline at end of file +export { Blankslate as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat-search/chat-search.tsx b/src/features/chats/components/chat-search/chat-search.tsx index 6c6b61fbf..8b7f04df1 100644 --- a/src/features/chats/components/chat-search/chat-search.tsx +++ b/src/features/chats/components/chat-search/chat-search.tsx @@ -114,4 +114,4 @@ const ChatSearch = (props: IChatSearch) => { ); }; -export default ChatSearch; +export { ChatSearch as default }; diff --git a/src/features/chats/components/chat-search/empty-results-blankslate.tsx b/src/features/chats/components/chat-search/empty-results-blankslate.tsx index 4a890f699..89e5a0d7b 100644 --- a/src/features/chats/components/chat-search/empty-results-blankslate.tsx +++ b/src/features/chats/components/chat-search/empty-results-blankslate.tsx @@ -24,4 +24,4 @@ const EmptyResultsBlankslate = () => { ); }; -export default EmptyResultsBlankslate; \ No newline at end of file +export { EmptyResultsBlankslate as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat-search/results.tsx b/src/features/chats/components/chat-search/results.tsx index 1edec0dde..28bef255d 100644 --- a/src/features/chats/components/chat-search/results.tsx +++ b/src/features/chats/components/chat-search/results.tsx @@ -79,4 +79,4 @@ const Results = ({ accountSearchResult, onSelect }: IResults) => { ); }; -export default Results; +export { Results as default }; diff --git a/src/features/chats/components/chat-textarea.tsx b/src/features/chats/components/chat-textarea.tsx index 7cb79b6cb..f5cbdb037 100644 --- a/src/features/chats/components/chat-textarea.tsx +++ b/src/features/chats/components/chat-textarea.tsx @@ -67,4 +67,4 @@ const ChatTextarea: React.FC = React.forwardRef(({ ); }); -export default ChatTextarea; +export { ChatTextarea as default }; diff --git a/src/features/chats/components/chat-upload-preview.tsx b/src/features/chats/components/chat-upload-preview.tsx index 8bbeda372..30d7d5c1e 100644 --- a/src/features/chats/components/chat-upload-preview.tsx +++ b/src/features/chats/components/chat-upload-preview.tsx @@ -53,4 +53,4 @@ const ChatUploadPreview: React.FC = ({ className, attachment } }; -export default ChatUploadPreview; \ No newline at end of file +export { ChatUploadPreview as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat-upload.tsx b/src/features/chats/components/chat-upload.tsx index 971171a57..80a192ace 100644 --- a/src/features/chats/components/chat-upload.tsx +++ b/src/features/chats/components/chat-upload.tsx @@ -61,4 +61,4 @@ const RemoveButton: React.FC = ({ onClick }) => ( ); -export default ChatUpload; \ No newline at end of file +export { ChatUpload as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat-widget/chat-pane-header.tsx b/src/features/chats/components/chat-widget/chat-pane-header.tsx index 0864434ad..377b0f8f8 100644 --- a/src/features/chats/components/chat-widget/chat-pane-header.tsx +++ b/src/features/chats/components/chat-widget/chat-pane-header.tsx @@ -74,4 +74,4 @@ const ChatPaneHeader = (props: IChatPaneHeader) => { ); }; -export default ChatPaneHeader; +export { ChatPaneHeader as default }; diff --git a/src/features/chats/components/chat-widget/chat-settings.tsx b/src/features/chats/components/chat-widget/chat-settings.tsx index 87d535f98..dff845e10 100644 --- a/src/features/chats/components/chat-widget/chat-settings.tsx +++ b/src/features/chats/components/chat-widget/chat-settings.tsx @@ -128,4 +128,4 @@ const ChatSettings = () => { ); }; -export default ChatSettings; +export { ChatSettings as default }; diff --git a/src/features/chats/components/chat-widget/chat-widget.tsx b/src/features/chats/components/chat-widget/chat-widget.tsx index 2be0e2861..5843d2bcb 100644 --- a/src/features/chats/components/chat-widget/chat-widget.tsx +++ b/src/features/chats/components/chat-widget/chat-widget.tsx @@ -22,4 +22,4 @@ const ChatWidget = () => { ); }; -export default ChatWidget; +export { ChatWidget as default }; diff --git a/src/features/chats/components/chat-widget/chat-window.tsx b/src/features/chats/components/chat-widget/chat-window.tsx index 66f92eee2..26a38d567 100644 --- a/src/features/chats/components/chat-widget/chat-window.tsx +++ b/src/features/chats/components/chat-widget/chat-window.tsx @@ -95,4 +95,4 @@ const ChatWindow = () => { ); }; -export default ChatWindow; +export { ChatWindow as default }; diff --git a/src/features/chats/components/chat-widget/headers/chat-search-header.tsx b/src/features/chats/components/chat-widget/headers/chat-search-header.tsx index 791dced52..b68e3a05e 100644 --- a/src/features/chats/components/chat-widget/headers/chat-search-header.tsx +++ b/src/features/chats/components/chat-widget/headers/chat-search-header.tsx @@ -43,4 +43,4 @@ const ChatSearchHeader = () => { ); }; -export default ChatSearchHeader; \ No newline at end of file +export { ChatSearchHeader as default }; \ No newline at end of file diff --git a/src/features/chats/components/chat.tsx b/src/features/chats/components/chat.tsx index 6aee4a3b2..68a14a410 100644 --- a/src/features/chats/components/chat.tsx +++ b/src/features/chats/components/chat.tsx @@ -195,4 +195,4 @@ const Chat: React.FC = ({ chat, inputRef, className }) => { ); }; -export default Chat; +export { Chat as default }; diff --git a/src/features/chats/index.tsx b/src/features/chats/index.tsx index c54bab37b..b06cf66e3 100644 --- a/src/features/chats/index.tsx +++ b/src/features/chats/index.tsx @@ -16,4 +16,4 @@ const ChatIndex: React.FC = ({ params }) => ( ); -export default ChatIndex; +export { ChatIndex as default }; diff --git a/src/features/community-timeline/index.tsx b/src/features/community-timeline/index.tsx index b6c6400a2..5d546f1d5 100644 --- a/src/features/community-timeline/index.tsx +++ b/src/features/community-timeline/index.tsx @@ -53,4 +53,4 @@ const CommunityTimeline = () => { ); }; -export default CommunityTimeline; +export { CommunityTimeline as default }; diff --git a/src/features/compose/components/autosuggest-account.tsx b/src/features/compose/components/autosuggest-account.tsx index d3b3a295f..6c82112ff 100644 --- a/src/features/compose/components/autosuggest-account.tsx +++ b/src/features/compose/components/autosuggest-account.tsx @@ -19,4 +19,4 @@ const AutosuggestAccount: React.FC = ({ id }) => { }; -export default AutosuggestAccount; +export { AutosuggestAccount as default }; diff --git a/src/features/compose/components/compose-form-button.tsx b/src/features/compose/components/compose-form-button.tsx index 0d4f47f00..cf25463a5 100644 --- a/src/features/compose/components/compose-form-button.tsx +++ b/src/features/compose/components/compose-form-button.tsx @@ -34,4 +34,4 @@ const ComposeFormButton: React.FC = ({ ); -export default ComposeFormButton; +export { ComposeFormButton as default }; diff --git a/src/features/compose/components/compose-form.tsx b/src/features/compose/components/compose-form.tsx index 800a403d8..4aa39a789 100644 --- a/src/features/compose/components/compose-form.tsx +++ b/src/features/compose/components/compose-form.tsx @@ -313,4 +313,4 @@ const ComposeForm = ({ id, shouldCondense, autoFocus, clickab ); }; -export default ComposeForm; +export { ComposeForm as default }; diff --git a/src/features/compose/components/markdown-button.tsx b/src/features/compose/components/markdown-button.tsx index daedd132b..103ef1129 100644 --- a/src/features/compose/components/markdown-button.tsx +++ b/src/features/compose/components/markdown-button.tsx @@ -34,4 +34,4 @@ const MarkdownButton: React.FC = ({ composeId }) => { }; -export default MarkdownButton; +export { MarkdownButton as default }; diff --git a/src/features/compose/components/poll-button.tsx b/src/features/compose/components/poll-button.tsx index c2a31c642..4459e2d2a 100644 --- a/src/features/compose/components/poll-button.tsx +++ b/src/features/compose/components/poll-button.tsx @@ -48,4 +48,4 @@ const PollButton: React.FC = ({ composeId, disabled }) => { ); }; -export default PollButton; +export { PollButton as default }; diff --git a/src/features/compose/components/polls/duration-selector.tsx b/src/features/compose/components/polls/duration-selector.tsx index 72b5de8bd..1e5b7a3ed 100644 --- a/src/features/compose/components/polls/duration-selector.tsx +++ b/src/features/compose/components/polls/duration-selector.tsx @@ -82,4 +82,4 @@ const DurationSelector = ({ onDurationChange }: IDurationSelector) => { ); }; -export default DurationSelector; +export { DurationSelector as default }; diff --git a/src/features/compose/components/polls/poll-form.tsx b/src/features/compose/components/polls/poll-form.tsx index ed45cbbad..44dab7dff 100644 --- a/src/features/compose/components/polls/poll-form.tsx +++ b/src/features/compose/components/polls/poll-form.tsx @@ -208,4 +208,4 @@ const PollForm: React.FC = ({ composeId }) => { ); }; -export default PollForm; +export { PollForm as default }; diff --git a/src/features/compose/components/privacy-dropdown.tsx b/src/features/compose/components/privacy-dropdown.tsx index 787b68bdf..fe1ba2a33 100644 --- a/src/features/compose/components/privacy-dropdown.tsx +++ b/src/features/compose/components/privacy-dropdown.tsx @@ -303,4 +303,4 @@ const PrivacyDropdown: React.FC = ({ ); }; -export default PrivacyDropdown; +export { PrivacyDropdown as default }; diff --git a/src/features/compose/components/reply-group-indicator.tsx b/src/features/compose/components/reply-group-indicator.tsx index eb73a21b3..75038d9b3 100644 --- a/src/features/compose/components/reply-group-indicator.tsx +++ b/src/features/compose/components/reply-group-indicator.tsx @@ -39,4 +39,4 @@ const ReplyGroupIndicator = (props: IReplyGroupIndicator) => { ); }; -export default ReplyGroupIndicator; \ No newline at end of file +export { ReplyGroupIndicator as default }; \ No newline at end of file diff --git a/src/features/compose/components/reply-indicator.tsx b/src/features/compose/components/reply-indicator.tsx index 4ed3db70e..5fc009666 100644 --- a/src/features/compose/components/reply-indicator.tsx +++ b/src/features/compose/components/reply-indicator.tsx @@ -63,4 +63,4 @@ const ReplyIndicator: React.FC = ({ className, status, hideActi ); }; -export default ReplyIndicator; +export { ReplyIndicator as default }; diff --git a/src/features/compose/components/reply-mentions.tsx b/src/features/compose/components/reply-mentions.tsx index c0542c551..b54b17df7 100644 --- a/src/features/compose/components/reply-mentions.tsx +++ b/src/features/compose/components/reply-mentions.tsx @@ -78,4 +78,4 @@ const ReplyMentions: React.FC = ({ composeId }) => { ); }; -export default ReplyMentions; +export { ReplyMentions as default }; diff --git a/src/features/compose/components/schedule-button.tsx b/src/features/compose/components/schedule-button.tsx index cf4e8bbbf..c9e6b272f 100644 --- a/src/features/compose/components/schedule-button.tsx +++ b/src/features/compose/components/schedule-button.tsx @@ -48,4 +48,4 @@ const ScheduleButton: React.FC = ({ composeId, disabled }) => { ); }; -export default ScheduleButton; +export { ScheduleButton as default }; diff --git a/src/features/compose/components/schedule-form.tsx b/src/features/compose/components/schedule-form.tsx index d883b9715..62eaccca1 100644 --- a/src/features/compose/components/schedule-form.tsx +++ b/src/features/compose/components/schedule-form.tsx @@ -8,7 +8,7 @@ import { HStack, Input, Stack, Text } from 'soapbox/components/ui'; import { DatePicker } from 'soapbox/features/ui/util/async-components'; import { useAppDispatch, useCompose } from 'soapbox/hooks'; -export const isCurrentOrFutureDate = (date: Date) => +const isCurrentOrFutureDate = (date: Date) => date && new Date().setHours(0, 0, 0, 0) <= new Date(date).setHours(0, 0, 0, 0); const isFiveMinutesFromNow = (time: Date) => { @@ -23,7 +23,7 @@ const messages = defineMessages({ remove: { id: 'schedule.remove', defaultMessage: 'Remove schedule' }, }); -export interface IScheduleForm { +interface IScheduleForm { composeId: string; } @@ -81,4 +81,8 @@ const ScheduleForm: React.FC = ({ composeId }) => { ); }; -export default ScheduleForm; +export { + isCurrentOrFutureDate, + type IScheduleForm, + ScheduleForm as default, +}; diff --git a/src/features/compose/components/search-results.tsx b/src/features/compose/components/search-results.tsx index 1c3b8cfed..d787b9899 100644 --- a/src/features/compose/components/search-results.tsx +++ b/src/features/compose/components/search-results.tsx @@ -237,4 +237,4 @@ const SearchResults = () => { ); }; -export default SearchResults; +export { SearchResults as default }; diff --git a/src/features/compose/components/search.tsx b/src/features/compose/components/search.tsx index 4faaf45b3..23f1b4804 100644 --- a/src/features/compose/components/search.tsx +++ b/src/features/compose/components/search.tsx @@ -182,4 +182,4 @@ const Search = (props: ISearch) => { ); }; -export default Search; +export { Search as default }; diff --git a/src/features/compose/components/spoiler-button.tsx b/src/features/compose/components/spoiler-button.tsx index 235209a83..854d840c6 100644 --- a/src/features/compose/components/spoiler-button.tsx +++ b/src/features/compose/components/spoiler-button.tsx @@ -34,4 +34,4 @@ const SpoilerButton: React.FC = ({ composeId }) => { ); }; -export default SpoilerButton; +export { SpoilerButton as default }; diff --git a/src/features/compose/components/spoiler-input.tsx b/src/features/compose/components/spoiler-input.tsx index 183f58812..22476efb3 100644 --- a/src/features/compose/components/spoiler-input.tsx +++ b/src/features/compose/components/spoiler-input.tsx @@ -77,4 +77,4 @@ const SpoilerInput = React.forwardRef(({ ); }); -export default SpoilerInput; +export { SpoilerInput as default }; diff --git a/src/features/compose/components/text-character-counter.tsx b/src/features/compose/components/text-character-counter.tsx index bdb61c999..ce696b753 100644 --- a/src/features/compose/components/text-character-counter.tsx +++ b/src/features/compose/components/text-character-counter.tsx @@ -23,4 +23,4 @@ const TextCharacterCounter: React.FC = ({ text, max }) => return checkRemainingText(diff); }; -export default TextCharacterCounter; +export { TextCharacterCounter as default }; diff --git a/src/features/compose/components/upload-button.tsx b/src/features/compose/components/upload-button.tsx index 71c01ef62..3524e7de6 100644 --- a/src/features/compose/components/upload-button.tsx +++ b/src/features/compose/components/upload-button.tsx @@ -8,10 +8,10 @@ const messages = defineMessages({ upload: { id: 'upload_button.label', defaultMessage: 'Add media attachment' }, }); -export const onlyImages = (types: string[] | undefined): boolean => +const onlyImages = (types: string[] | undefined): boolean => types?.every((type) => type.startsWith('image/')) ?? false; -export interface IUploadButton { +interface IUploadButton { disabled?: boolean; unavailable?: boolean; onSelectFile: (files: FileList, intl: IntlShape) => void; @@ -85,4 +85,8 @@ const UploadButton: React.FC = ({ ); }; -export default UploadButton; +export { + onlyImages, + type IUploadButton, + UploadButton as default, +}; diff --git a/src/features/compose/components/upload-form.tsx b/src/features/compose/components/upload-form.tsx index ac6ea3d8d..85dd8a4c9 100644 --- a/src/features/compose/components/upload-form.tsx +++ b/src/features/compose/components/upload-form.tsx @@ -58,4 +58,4 @@ const UploadForm: React.FC = ({ composeId, onSubmit }) => { ); }; -export default UploadForm; +export { UploadForm as default }; diff --git a/src/features/compose/components/upload-progress.tsx b/src/features/compose/components/upload-progress.tsx index a3b9c0758..317a43d2c 100644 --- a/src/features/compose/components/upload-progress.tsx +++ b/src/features/compose/components/upload-progress.tsx @@ -23,4 +23,4 @@ const ComposeUploadProgress: React.FC = ({ composeId }) ); }; -export default ComposeUploadProgress; +export { ComposeUploadProgress as default }; diff --git a/src/features/compose/components/upload.tsx b/src/features/compose/components/upload.tsx index 5ba440996..0e26af0b6 100644 --- a/src/features/compose/components/upload.tsx +++ b/src/features/compose/components/upload.tsx @@ -50,4 +50,4 @@ const UploadCompose: React.FC = ({ composeId, id, onSubmit, onDr ); }; -export default UploadCompose; +export { UploadCompose as default }; diff --git a/src/features/compose/components/visual-character-counter.tsx b/src/features/compose/components/visual-character-counter.tsx index 647b3e8c3..1b4bb90ad 100644 --- a/src/features/compose/components/visual-character-counter.tsx +++ b/src/features/compose/components/visual-character-counter.tsx @@ -32,4 +32,4 @@ const VisualCharacterCounter: React.FC = ({ text, max } ); }; -export default VisualCharacterCounter; +export { VisualCharacterCounter as default }; diff --git a/src/features/compose/components/warning.tsx b/src/features/compose/components/warning.tsx index 8b8911466..490677cca 100644 --- a/src/features/compose/components/warning.tsx +++ b/src/features/compose/components/warning.tsx @@ -18,4 +18,4 @@ const Warning: React.FC = ({ message }) => ( ); -export default Warning; +export { Warning as default }; diff --git a/src/features/compose/containers/quoted-status-container.tsx b/src/features/compose/containers/quoted-status-container.tsx index 879d73267..1af3e83c0 100644 --- a/src/features/compose/containers/quoted-status-container.tsx +++ b/src/features/compose/containers/quoted-status-container.tsx @@ -35,4 +35,4 @@ const QuotedStatusContainer: React.FC = ({ composeId }) ); }; -export default QuotedStatusContainer; +export { QuotedStatusContainer as default }; diff --git a/src/features/compose/containers/reply-indicator-container.ts b/src/features/compose/containers/reply-indicator-container.ts index b77c4a8d0..ff8612d59 100644 --- a/src/features/compose/containers/reply-indicator-container.ts +++ b/src/features/compose/containers/reply-indicator-container.ts @@ -32,4 +32,6 @@ const mapDispatchToProps = (dispatch: AppDispatch) => ({ }); -export default connect(makeMapStateToProps, mapDispatchToProps)(ReplyIndicator); +const ReplyIndicatorContainer = connect(makeMapStateToProps, mapDispatchToProps)(ReplyIndicator); + +export { ReplyIndicatorContainer as default }; diff --git a/src/features/compose/containers/upload-button-container.ts b/src/features/compose/containers/upload-button-container.ts index 6b2307c93..8742eb813 100644 --- a/src/features/compose/containers/upload-button-container.ts +++ b/src/features/compose/containers/upload-button-container.ts @@ -20,4 +20,6 @@ const mapDispatchToProps = (dispatch: AppDispatch, { composeId }: { composeId: s }); -export default connect(mapStateToProps, mapDispatchToProps)(UploadButton); +const UploadButtonContainer = connect(mapStateToProps, mapDispatchToProps)(UploadButton); + +export { UploadButtonContainer as default }; diff --git a/src/features/compose/containers/warning-container.tsx b/src/features/compose/containers/warning-container.tsx index 22a8b1571..fa12776a2 100644 --- a/src/features/compose/containers/warning-container.tsx +++ b/src/features/compose/containers/warning-container.tsx @@ -69,4 +69,4 @@ const WarningWrapper: React.FC = ({ composeId }) => { return null; }; -export default WarningWrapper; +export { WarningWrapper as default }; diff --git a/src/features/compose/editor/index.tsx b/src/features/compose/editor/index.tsx index eeb6c1f02..9daf19b9d 100644 --- a/src/features/compose/editor/index.tsx +++ b/src/features/compose/editor/index.tsx @@ -174,4 +174,4 @@ const ComposeEditor = React.forwardRef(({ ); }); -export default ComposeEditor; +export { ComposeEditor as default }; diff --git a/src/features/compose/editor/plugins/autosuggest-plugin.tsx b/src/features/compose/editor/plugins/autosuggest-plugin.tsx index 368af53b2..fe95564a6 100644 --- a/src/features/compose/editor/plugins/autosuggest-plugin.tsx +++ b/src/features/compose/editor/plugins/autosuggest-plugin.tsx @@ -553,4 +553,4 @@ const AutosuggestPlugin = ({ ); }; -export default AutosuggestPlugin; +export { AutosuggestPlugin as default }; diff --git a/src/features/compose/editor/plugins/focus-plugin.tsx b/src/features/compose/editor/plugins/focus-plugin.tsx index 8a076f199..d35ba2d0f 100644 --- a/src/features/compose/editor/plugins/focus-plugin.tsx +++ b/src/features/compose/editor/plugins/focus-plugin.tsx @@ -6,7 +6,7 @@ interface IFocusPlugin { autoFocus?: boolean; } -export const FOCUS_EDITOR_COMMAND: LexicalCommand = createCommand(); +const FOCUS_EDITOR_COMMAND: LexicalCommand = createCommand(); const FocusPlugin: React.FC = ({ autoFocus }) => { const [editor] = useLexicalComposerContext(); @@ -33,4 +33,7 @@ const FocusPlugin: React.FC = ({ autoFocus }) => { return null; }; -export default FocusPlugin; +export { + FOCUS_EDITOR_COMMAND, + FocusPlugin as default, +}; diff --git a/src/features/compose/editor/plugins/link-plugin.tsx b/src/features/compose/editor/plugins/link-plugin.tsx index f4e8efe6b..27e6368ae 100644 --- a/src/features/compose/editor/plugins/link-plugin.tsx +++ b/src/features/compose/editor/plugins/link-plugin.tsx @@ -12,7 +12,7 @@ const urlRegExp = new RegExp( /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/, ); -export const validateUrl = (url: string): boolean => { +const validateUrl = (url: string): boolean => { // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://. // Maybe show a dialog where they user can type the URL before inserting it. return url === 'https://' || urlRegExp.test(url); @@ -20,4 +20,7 @@ export const validateUrl = (url: string): boolean => { const LinkPlugin = (): JSX.Element => ; -export default LinkPlugin; +export { + validateUrl, + LinkPlugin as default, +}; diff --git a/src/features/compose/editor/plugins/ref-plugin.tsx b/src/features/compose/editor/plugins/ref-plugin.tsx index b13cea3e1..361d58388 100644 --- a/src/features/compose/editor/plugins/ref-plugin.tsx +++ b/src/features/compose/editor/plugins/ref-plugin.tsx @@ -15,4 +15,4 @@ const RefPlugin = React.forwardRef((_props, ref) => { return null; }); -export default RefPlugin; +export { RefPlugin as default }; diff --git a/src/features/compose/editor/plugins/state-plugin.tsx b/src/features/compose/editor/plugins/state-plugin.tsx index cb53a1104..1b1ac53b3 100644 --- a/src/features/compose/editor/plugins/state-plugin.tsx +++ b/src/features/compose/editor/plugins/state-plugin.tsx @@ -61,4 +61,4 @@ const StatePlugin: React.FC = ({ composeId }) => { return null; }; -export default StatePlugin; +export { StatePlugin as default }; diff --git a/src/features/compose/editor/plugins/submit-plugin.tsx b/src/features/compose/editor/plugins/submit-plugin.tsx index ea7dde176..c41d3ed59 100644 --- a/src/features/compose/editor/plugins/submit-plugin.tsx +++ b/src/features/compose/editor/plugins/submit-plugin.tsx @@ -25,4 +25,4 @@ const SubmitPlugin: React.FC = ({ composeId, handleSubmit }) => { return null; }; -export default SubmitPlugin; +export { SubmitPlugin as default }; diff --git a/src/features/compose/util/counter.ts b/src/features/compose/util/counter.ts index dbf491298..675996015 100644 --- a/src/features/compose/util/counter.ts +++ b/src/features/compose/util/counter.ts @@ -2,7 +2,9 @@ import { urlRegex } from './url-regex'; const urlPlaceholder = 'xxxxxxxxxxxxxxxxxxxxxxx'; -export const countableText = (inputText: string) => +const countableText = (inputText: string) => inputText .replace(urlRegex, urlPlaceholder) .replace(/(^|[^/\w])@(([a-z0-9_]+)@[a-z0-9.-]+[a-z0-9]+)/ig, '$1@$3'); + +export { countableText }; diff --git a/src/features/compose/util/url-regex.ts b/src/features/compose/util/url-regex.ts index fccabb1e5..c10c04aa8 100644 --- a/src/features/compose/util/url-regex.ts +++ b/src/features/compose/util/url-regex.ts @@ -1,6 +1,6 @@ const regexen: { [x: string]: string | RegExp } = {}; -const regexSupplant = function(regex: string | RegExp, flags = '') { +const regexSupplant = (regex: string | RegExp, flags = '') => { if (typeof regex !== 'string') { if (regex.global && flags.indexOf('g') < 0) { flags += 'g'; @@ -14,7 +14,7 @@ const regexSupplant = function(regex: string | RegExp, flags = '') { regex = regex.source; } - return new RegExp(regex.replace(/#\{(\w+)\}/g, function(match, name) { + return new RegExp(regex.replace(/#\{(\w+)\}/g, (match, name) => { let newRegex = regexen[name] || ''; if (typeof newRegex !== 'string') { newRegex = newRegex.source; @@ -23,13 +23,10 @@ const regexSupplant = function(regex: string | RegExp, flags = '') { }), flags); }; -const stringSupplant = function(str: string, values: { [x: string]: any }) { - return str.replace(/#\{(\w+)\}/g, function(match, name) { - return values[name] || ''; - }); -}; +const stringSupplant = (str: string, values: { [x: string]: any }) => + str.replace(/#\{(\w+)\}/g, (match, name) => values[name] || ''); -export const urlRegex = (function() { +const urlRegex = (() => { regexen.spaces_group = /\x09-\x0D\x20\x85\xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000/; // eslint-disable-line no-control-regex regexen.invalid_chars_group = /\uFFFE\uFEFF\uFFFF\u202A-\u202E/; // eslint-disable-next-line no-useless-escape @@ -194,4 +191,6 @@ export const urlRegex = (function() { ')', 'gi'); return regexen.validUrl; -}()); +})(); + +export { urlRegex }; diff --git a/src/features/conversations/components/conversation.tsx b/src/features/conversations/components/conversation.tsx index 20cbf4d98..952c148b5 100644 --- a/src/features/conversations/components/conversation.tsx +++ b/src/features/conversations/components/conversation.tsx @@ -59,4 +59,4 @@ const Conversation: React.FC = ({ conversationId, onMoveUp, onMov ); }; -export default Conversation; +export { Conversation as default }; diff --git a/src/features/conversations/components/conversations-list.tsx b/src/features/conversations/components/conversations-list.tsx index 65c2ef3e1..e6e073967 100644 --- a/src/features/conversations/components/conversations-list.tsx +++ b/src/features/conversations/components/conversations-list.tsx @@ -72,4 +72,4 @@ const ConversationsList: React.FC = () => { ); }; -export default ConversationsList; +export { ConversationsList as default }; diff --git a/src/features/conversations/index.tsx b/src/features/conversations/index.tsx index 1f6774ab9..4fa7b1fbd 100644 --- a/src/features/conversations/index.tsx +++ b/src/features/conversations/index.tsx @@ -46,4 +46,4 @@ const ConversationsTimeline = () => { ); }; -export default ConversationsTimeline; +export { ConversationsTimeline as default }; diff --git a/src/features/crypto-donate/components/crypto-address.tsx b/src/features/crypto-donate/components/crypto-address.tsx index 0c07387eb..51ad27854 100644 --- a/src/features/crypto-donate/components/crypto-address.tsx +++ b/src/features/crypto-donate/components/crypto-address.tsx @@ -10,7 +10,7 @@ import { getTitle } from '../utils/coin-db'; import CryptoIcon from './crypto-icon'; -export interface ICryptoAddress { +interface ICryptoAddress { address: string; ticker: string; note?: string; @@ -62,4 +62,7 @@ const CryptoAddress: React.FC = (props): JSX.Element => { ); }; -export default CryptoAddress; +export { + type ICryptoAddress, + CryptoAddress as default, +}; diff --git a/src/features/crypto-donate/components/crypto-donate-panel.tsx b/src/features/crypto-donate/components/crypto-donate-panel.tsx index a31d6feeb..f688d7e3c 100644 --- a/src/features/crypto-donate/components/crypto-donate-panel.tsx +++ b/src/features/crypto-donate/components/crypto-donate-panel.tsx @@ -49,4 +49,4 @@ const CryptoDonatePanel: React.FC = ({ limit = 3 }): JSX.Ele ); }; -export default CryptoDonatePanel; +export { CryptoDonatePanel as default }; diff --git a/src/features/crypto-donate/components/crypto-icon.tsx b/src/features/crypto-donate/components/crypto-icon.tsx index e5fa8d2b1..2c7e79b20 100644 --- a/src/features/crypto-donate/components/crypto-icon.tsx +++ b/src/features/crypto-donate/components/crypto-icon.tsx @@ -25,4 +25,4 @@ const CryptoIcon: React.FC = ({ ticker, title, className, imgClassN ); -export default CryptoIcon; +export { CryptoIcon as default }; diff --git a/src/features/crypto-donate/components/detailed-crypto-address.tsx b/src/features/crypto-donate/components/detailed-crypto-address.tsx index a1cf9c2bc..d828e7c3e 100644 --- a/src/features/crypto-donate/components/detailed-crypto-address.tsx +++ b/src/features/crypto-donate/components/detailed-crypto-address.tsx @@ -45,4 +45,4 @@ const DetailedCryptoAddress: React.FC = ({ address, tick ); }; -export default DetailedCryptoAddress; +export { DetailedCryptoAddress as default }; diff --git a/src/features/crypto-donate/components/lightning-address.tsx b/src/features/crypto-donate/components/lightning-address.tsx index aa52d61f3..41addb999 100644 --- a/src/features/crypto-donate/components/lightning-address.tsx +++ b/src/features/crypto-donate/components/lightning-address.tsx @@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl'; import CopyableInput from 'soapbox/components/copyable-input'; import { Text, Stack, HStack, Emoji } from 'soapbox/components/ui'; -export interface ILightningAddress { +interface ILightningAddress { address: string; } @@ -29,4 +29,7 @@ const LightningAddress: React.FC = (props): JSX.Element => { ); }; -export default LightningAddress; +export { + type ILightningAddress, + LightningAddress as default, +}; diff --git a/src/features/crypto-donate/components/site-wallet.tsx b/src/features/crypto-donate/components/site-wallet.tsx index 0494ecf46..a35a086eb 100644 --- a/src/features/crypto-donate/components/site-wallet.tsx +++ b/src/features/crypto-donate/components/site-wallet.tsx @@ -27,4 +27,4 @@ const SiteWallet: React.FC = ({ limit }): JSX.Element => { ); }; -export default SiteWallet; +export { SiteWallet as default }; diff --git a/src/features/crypto-donate/index.tsx b/src/features/crypto-donate/index.tsx index f2affe4bd..1bf6e1cd1 100644 --- a/src/features/crypto-donate/index.tsx +++ b/src/features/crypto-donate/index.tsx @@ -37,4 +37,4 @@ const CryptoDonate: React.FC = (): JSX.Element => { ); }; -export default CryptoDonate; +export { CryptoDonate as default }; diff --git a/src/features/crypto-donate/utils/block-explorer.ts b/src/features/crypto-donate/utils/block-explorer.ts index b0f7a6965..5cfba45b6 100644 --- a/src/features/crypto-donate/utils/block-explorer.ts +++ b/src/features/crypto-donate/utils/block-explorer.ts @@ -2,8 +2,10 @@ import blockExplorers from './block-explorers.json'; type BlockExplorers = Record; -export const getExplorerUrl = (ticker: string, address: string): string | null => { +const getExplorerUrl = (ticker: string, address: string): string | null => { const template = (blockExplorers as BlockExplorers)[ticker]; if (!template) return null; return template.replace('{address}', address); }; + +export { getExplorerUrl }; diff --git a/src/features/crypto-donate/utils/coin-db.ts b/src/features/crypto-donate/utils/coin-db.ts index 1949a62cf..e08155dea 100644 --- a/src/features/crypto-donate/utils/coin-db.ts +++ b/src/features/crypto-donate/utils/coin-db.ts @@ -4,10 +4,11 @@ import manifestMap from './manifest-map'; // All this does is converts the result from manifest_map.js into an ImmutableMap const coinDB = fromJS(manifestMap); -export default coinDB; /** Get title from CoinDB based on ticker symbol */ -export const getTitle = (ticker: string): string => { +const getTitle = (ticker: string): string => { const title = coinDB.getIn([ticker, 'name']); return typeof title === 'string' ? title : ''; }; + +export { getTitle, coinDB as default }; diff --git a/src/features/crypto-donate/utils/manifest-map.ts b/src/features/crypto-donate/utils/manifest-map.ts index e7a8fdeeb..239e373f2 100644 --- a/src/features/crypto-donate/utils/manifest-map.ts +++ b/src/features/crypto-donate/utils/manifest-map.ts @@ -8,6 +8,6 @@ const manifestMap = (fromJS(manifest) as ImmutableList>, entry: ImmutableMap) => acc.set(entry.get('symbol')!.toLowerCase(), entry), ImmutableMap(), -); +).toJS(); -export default manifestMap.toJS(); +export { manifestMap as default }; diff --git a/src/features/delete-account/index.tsx b/src/features/delete-account/index.tsx index 62216d377..16240fce3 100644 --- a/src/features/delete-account/index.tsx +++ b/src/features/delete-account/index.tsx @@ -79,4 +79,4 @@ const DeleteAccount = () => { ); }; -export default DeleteAccount; +export { DeleteAccount as default }; diff --git a/src/features/developers/apps/create.tsx b/src/features/developers/apps/create.tsx index 7a1a942ec..e57bfc9f4 100644 --- a/src/features/developers/apps/create.tsx +++ b/src/features/developers/apps/create.tsx @@ -193,4 +193,4 @@ const CreateApp: React.FC = () => { ); }; -export default CreateApp; +export { CreateApp as default }; diff --git a/src/features/developers/components/indicator.tsx b/src/features/developers/components/indicator.tsx index fc95329dd..1fc90ab96 100644 --- a/src/features/developers/components/indicator.tsx +++ b/src/features/developers/components/indicator.tsx @@ -19,4 +19,4 @@ const Indicator: React.FC = ({ state = 'inactive', size = 'sm' }) => /> ); -export default Indicator; +export { Indicator as default }; diff --git a/src/features/developers/developers-challenge.tsx b/src/features/developers/developers-challenge.tsx index ee83ba809..fe0f66d6b 100644 --- a/src/features/developers/developers-challenge.tsx +++ b/src/features/developers/developers-challenge.tsx @@ -74,4 +74,4 @@ const DevelopersChallenge = () => { ); }; -export default DevelopersChallenge; +export { DevelopersChallenge as default }; diff --git a/src/features/developers/developers-menu.tsx b/src/features/developers/developers-menu.tsx index 185f289b2..a26ad71de 100644 --- a/src/features/developers/developers-menu.tsx +++ b/src/features/developers/developers-menu.tsx @@ -131,4 +131,4 @@ const Developers: React.FC = () => { ); }; -export default Developers; +export { Developers as default }; diff --git a/src/features/developers/index.tsx b/src/features/developers/index.tsx index 378207e46..39e0a7ce0 100644 --- a/src/features/developers/index.tsx +++ b/src/features/developers/index.tsx @@ -12,4 +12,4 @@ const Developers: React.FC = () => { return isDeveloper ? : ; }; -export default Developers; +export { Developers as default }; diff --git a/src/features/developers/service-worker-info.tsx b/src/features/developers/service-worker-info.tsx index 362189c3e..38770d745 100644 --- a/src/features/developers/service-worker-info.tsx +++ b/src/features/developers/service-worker-info.tsx @@ -137,4 +137,4 @@ const ServiceWorkerInfo: React.FC = () => { ); }; -export default ServiceWorkerInfo; \ No newline at end of file +export { ServiceWorkerInfo as default }; \ No newline at end of file diff --git a/src/features/developers/settings-store.tsx b/src/features/developers/settings-store.tsx index 7115f8303..a212ceab3 100644 --- a/src/features/developers/settings-store.tsx +++ b/src/features/developers/settings-store.tsx @@ -114,4 +114,4 @@ const SettingsStore: React.FC = () => { ); }; -export default SettingsStore; +export { SettingsStore as default }; diff --git a/src/features/direct-timeline/index.tsx b/src/features/direct-timeline/index.tsx index ba8ba1cb0..309b04668 100644 --- a/src/features/direct-timeline/index.tsx +++ b/src/features/direct-timeline/index.tsx @@ -52,4 +52,4 @@ const DirectTimeline = () => { ); }; -export default DirectTimeline; +export { DirectTimeline as default }; diff --git a/src/features/directory/components/account-card.tsx b/src/features/directory/components/account-card.tsx index 3e28821b1..3d4dbb4ef 100644 --- a/src/features/directory/components/account-card.tsx +++ b/src/features/directory/components/account-card.tsx @@ -100,4 +100,4 @@ const AccountCard: React.FC = ({ id }) => { ); }; -export default AccountCard; +export { AccountCard as default }; diff --git a/src/features/directory/index.tsx b/src/features/directory/index.tsx index 45cdfdc65..a68437cbb 100644 --- a/src/features/directory/index.tsx +++ b/src/features/directory/index.tsx @@ -104,4 +104,4 @@ const Directory = () => { ); }; -export default Directory; +export { Directory as default }; diff --git a/src/features/domain-blocks/index.tsx b/src/features/domain-blocks/index.tsx index cf8978ad9..078c79435 100644 --- a/src/features/domain-blocks/index.tsx +++ b/src/features/domain-blocks/index.tsx @@ -55,4 +55,4 @@ const DomainBlocks: React.FC = () => { ); }; -export default DomainBlocks; +export { DomainBlocks as default }; diff --git a/src/features/draft-statuses/builder.tsx b/src/features/draft-statuses/builder.tsx index 1e24c8c39..8f888be24 100644 --- a/src/features/draft-statuses/builder.tsx +++ b/src/features/draft-statuses/builder.tsx @@ -19,7 +19,7 @@ const buildPoll = (draftStatus: DraftStatus) => { } }; -export const buildStatus = (state: RootState, draftStatus: DraftStatus) => { +const buildStatus = (state: RootState, draftStatus: DraftStatus) => { const me = state.me as string; const account = state.entities[Entities.ACCOUNTS]?.store[me]; @@ -41,3 +41,5 @@ export const buildStatus = (state: RootState, draftStatus: DraftStatus) => { return calculateStatus(normalizeStatus(status)); }; + +export { buildStatus }; diff --git a/src/features/draft-statuses/components/draft-status-action-bar.tsx b/src/features/draft-statuses/components/draft-status-action-bar.tsx index 7558700ac..053f4a775 100644 --- a/src/features/draft-statuses/components/draft-status-action-bar.tsx +++ b/src/features/draft-statuses/components/draft-status-action-bar.tsx @@ -62,4 +62,4 @@ const DraftStatusActionBar: React.FC = ({ source, status ); }; -export default DraftStatusActionBar; +export { DraftStatusActionBar as default }; diff --git a/src/features/draft-statuses/components/draft-status.tsx b/src/features/draft-statuses/components/draft-status.tsx index 92531d24a..608ff9cf5 100644 --- a/src/features/draft-statuses/components/draft-status.tsx +++ b/src/features/draft-statuses/components/draft-status.tsx @@ -85,4 +85,4 @@ const DraftStatus: React.FC = ({ draftStatus, ...other }) => { ); }; -export default DraftStatus; +export { DraftStatus as default }; diff --git a/src/features/draft-statuses/index.tsx b/src/features/draft-statuses/index.tsx index 60fd1bd7a..5bf7ec85f 100644 --- a/src/features/draft-statuses/index.tsx +++ b/src/features/draft-statuses/index.tsx @@ -37,4 +37,4 @@ const DraftStatuses = () => { ); }; -export default DraftStatuses; +export { DraftStatuses as default }; diff --git a/src/features/edit-email/index.tsx b/src/features/edit-email/index.tsx index 2c783ddb9..686f0af36 100644 --- a/src/features/edit-email/index.tsx +++ b/src/features/edit-email/index.tsx @@ -79,4 +79,4 @@ const EditEmail = () => { ); }; -export default EditEmail; +export { EditEmail as default }; diff --git a/src/features/edit-password/index.tsx b/src/features/edit-password/index.tsx index 4d77b07d1..f22eb1570 100644 --- a/src/features/edit-password/index.tsx +++ b/src/features/edit-password/index.tsx @@ -94,4 +94,4 @@ const EditPassword = () => { ); }; -export default EditPassword; +export { EditPassword as default }; diff --git a/src/features/edit-profile/components/avatar-picker.tsx b/src/features/edit-profile/components/avatar-picker.tsx index a973ec302..c45e8f500 100644 --- a/src/features/edit-profile/components/avatar-picker.tsx +++ b/src/features/edit-profile/components/avatar-picker.tsx @@ -61,4 +61,4 @@ const AvatarPicker = React.forwardRef(({ classNam ); }); -export default AvatarPicker; +export { AvatarPicker as default }; diff --git a/src/features/edit-profile/components/header-picker.tsx b/src/features/edit-profile/components/header-picker.tsx index fd60e79c6..bcf942142 100644 --- a/src/features/edit-profile/components/header-picker.tsx +++ b/src/features/edit-profile/components/header-picker.tsx @@ -86,4 +86,4 @@ const HeaderPicker = React.forwardRef(({ src, onC ); }); -export default HeaderPicker; +export { HeaderPicker as default }; diff --git a/src/features/edit-profile/index.tsx b/src/features/edit-profile/index.tsx index 14f9cc1f5..45a73355f 100644 --- a/src/features/edit-profile/index.tsx +++ b/src/features/edit-profile/index.tsx @@ -425,4 +425,4 @@ const EditProfile: React.FC = () => { ); }; -export default EditProfile; +export { EditProfile as default }; diff --git a/src/features/embedded-status/index.tsx b/src/features/embedded-status/index.tsx index ed97170cf..794c3c1c9 100644 --- a/src/features/embedded-status/index.tsx +++ b/src/features/embedded-status/index.tsx @@ -74,4 +74,4 @@ const EmbeddedStatus: React.FC = ({ params }) => { ); }; -export default EmbeddedStatus; +export { EmbeddedStatus as default }; diff --git a/src/features/emoji/components/emoji-picker-dropdown.tsx b/src/features/emoji/components/emoji-picker-dropdown.tsx index c64620043..989c94bc1 100644 --- a/src/features/emoji/components/emoji-picker-dropdown.tsx +++ b/src/features/emoji/components/emoji-picker-dropdown.tsx @@ -13,7 +13,7 @@ import { EmojiPicker } from '../../ui/util/async-components'; import type { Emoji, CustomEmoji, NativeEmoji } from 'soapbox/features/emoji'; -export const messages = defineMessages({ +const messages = defineMessages({ emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' }, emoji_pick: { id: 'emoji_button.pick', defaultMessage: 'Pick an emoji…' }, emoji_oh_no: { id: 'emoji_button.oh_no', defaultMessage: 'Oh no!' }, @@ -40,7 +40,7 @@ export const messages = defineMessages({ skins_6: { id: 'emoji_button.skins_6', defaultMessage: 'Dark' }, }); -export interface IEmojiPickerDropdown { +interface IEmojiPickerDropdown { onPickEmoji?: (emoji: Emoji) => void; condensed?: boolean; withCustom?: boolean; @@ -71,7 +71,7 @@ const DEFAULTS = [ 'ok_hand', ]; -export const getFrequentlyUsedEmojis = createSelector([ +const getFrequentlyUsedEmojis = createSelector([ (state: RootState) => state.settings.get('frequentlyUsedEmojis', ImmutableMap()), ], (emojiCounters: ImmutableMap) => { let emojis = emojiCounters @@ -235,4 +235,9 @@ const EmojiPickerDropdown: React.FC = ({ ); }; -export default EmojiPickerDropdown; +export { + messages, + type IEmojiPickerDropdown, + getFrequentlyUsedEmojis, + EmojiPickerDropdown as default, +}; diff --git a/src/features/emoji/components/emoji-picker.tsx b/src/features/emoji/components/emoji-picker.tsx index aa8b3fe62..82449986e 100644 --- a/src/features/emoji/components/emoji-picker.tsx +++ b/src/features/emoji/components/emoji-picker.tsx @@ -21,4 +21,4 @@ const Picker: React.FC = (props) => { return
; }; -export default Picker; +export { Picker as default }; diff --git a/src/features/emoji/containers/emoji-picker-dropdown-container.tsx b/src/features/emoji/containers/emoji-picker-dropdown-container.tsx index 51ade8de2..ccfd0cc18 100644 --- a/src/features/emoji/containers/emoji-picker-dropdown-container.tsx +++ b/src/features/emoji/containers/emoji-picker-dropdown-container.tsx @@ -9,7 +9,7 @@ import { useClickOutside } from 'soapbox/hooks'; import EmojiPickerDropdown, { IEmojiPickerDropdown } from '../components/emoji-picker-dropdown'; -export const messages = defineMessages({ +const messages = defineMessages({ emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' }, }); @@ -74,4 +74,7 @@ const EmojiPickerDropdownContainer = ( ); }; -export default EmojiPickerDropdownContainer; +export { + messages, + EmojiPickerDropdownContainer as default, +}; diff --git a/src/features/emoji/data.ts b/src/features/emoji/data.ts index 1d840e03f..db8db115b 100644 --- a/src/features/emoji/data.ts +++ b/src/features/emoji/data.ts @@ -1,17 +1,17 @@ import data from '@emoji-mart/data/sets/14/twitter.json'; -export interface NativeEmoji { +interface NativeEmoji { unified: string; native: string; x: number; y: number; } -export interface CustomEmoji { +interface CustomEmoji { src: string; } -export interface Emoji { +interface Emoji { id: string; name: string; keywords: string[]; @@ -19,25 +19,25 @@ export interface Emoji { version?: number; } -export interface EmojiCategory { +interface EmojiCategory { id: string; emojis: string[]; } -export interface EmojiMap { +interface EmojiMap { [s: string]: Emoji; } -export interface EmojiAlias { +interface EmojiAlias { [s: string]: string; } -export interface EmojiSheet { +interface EmojiSheet { cols: number; rows: number; } -export interface EmojiData { +interface EmojiData { categories: EmojiCategory[]; emojis: EmojiMap; aliases: EmojiAlias; @@ -47,6 +47,18 @@ export interface EmojiData { const emojiData = data as EmojiData; const { categories, emojis, aliases, sheet } = emojiData; -export { categories, emojis, aliases, sheet }; - -export default emojiData; +export { + type NativeEmoji, + type CustomEmoji, + type Emoji, + type EmojiCategory, + type EmojiMap, + type EmojiAlias, + type EmojiSheet, + type EmojiData, + categories, + emojis, + aliases, + sheet, + emojiData as default, +}; diff --git a/src/features/emoji/index.ts b/src/features/emoji/index.ts index 6d23b8afd..4f75c87e1 100644 --- a/src/features/emoji/index.ts +++ b/src/features/emoji/index.ts @@ -18,14 +18,14 @@ import type { Emoji as EmojiMart, CustomEmoji as EmojiMartCustom } from 'soapbox * and one type that is used everywhere that the above two are converted into */ -export interface CustomEmoji { +interface CustomEmoji { id: string; colons: string; custom: true; imageUrl: string; } -export interface NativeEmoji { +interface NativeEmoji { id: string; colons: string; custom?: false; @@ -33,12 +33,12 @@ export interface NativeEmoji { native: string; } -export type Emoji = CustomEmoji | NativeEmoji; +type Emoji = CustomEmoji | NativeEmoji; -export const isCustomEmoji = (emoji: Emoji): emoji is CustomEmoji => +const isCustomEmoji = (emoji: Emoji): emoji is CustomEmoji => (emoji as CustomEmoji).imageUrl !== undefined; -export const isNativeEmoji = (emoji: Emoji): emoji is NativeEmoji => +const isNativeEmoji = (emoji: Emoji): emoji is NativeEmoji => (emoji as NativeEmoji).native !== undefined; const isAlphaNumeric = (c: string) => { @@ -79,7 +79,7 @@ const convertEmoji = (str: string, customEmojis: any) => { return str; }; -export const emojifyText = (str: string, customEmojis = {}) => { +const emojifyText = (str: string, customEmojis = {}) => { let buf = ''; let stack = ''; let open = false; @@ -144,7 +144,7 @@ export const emojifyText = (str: string, customEmojis = {}) => { return buf; }; -export const parseHTML = (str: string): { text: boolean; data: string }[] => { +const parseHTML = (str: string): { text: boolean; data: string }[] => { const tokens = []; let buf = ''; let stack = ''; @@ -198,15 +198,13 @@ const emojify = (str: string, customEmojis = {}) => }) .join(''); -export default emojify; - -export const buildCustomEmojis = (customEmojis: any) => { +const buildCustomEmojis = (customEmojis: any) => { const emojis: EmojiMart[] = []; customEmojis.forEach((emoji: any) => { const shortcode = emoji.get('shortcode'); - const url = emoji.get('static_url'); - const name = shortcode.replace(':', ''); + const url = emoji.get('static_url'); + const name = shortcode.replace(':', ''); emojis.push({ id: name, @@ -218,3 +216,15 @@ export const buildCustomEmojis = (customEmojis: any) => { return emojis; }; + +export { + type CustomEmoji, + type NativeEmoji, + type Emoji, + isCustomEmoji, + isNativeEmoji, + emojifyText, + parseHTML, + buildCustomEmojis, + emojify as default, +}; diff --git a/src/features/emoji/mapping.ts b/src/features/emoji/mapping.ts index bc769618d..5d5ba507a 100644 --- a/src/features/emoji/mapping.ts +++ b/src/features/emoji/mapping.ts @@ -79,7 +79,7 @@ const stripcodes = (unified: string, native: string) => { } }; -export const generateMappings = (data: EmojiData): UnicodeMap => { +const generateMappings = (data: EmojiData): UnicodeMap => { const result: UnicodeMap = {}; const emojis = Object.values(data.emojis ?? {}); @@ -103,4 +103,4 @@ export const generateMappings = (data: EmojiData): UnicodeMap => { const unicodeMapping = generateMappings(data); -export default unicodeMapping; +export { generateMappings, unicodeMapping as default }; diff --git a/src/features/emoji/search.ts b/src/features/emoji/search.ts index 5e1143e35..f386c3b72 100644 --- a/src/features/emoji/search.ts +++ b/src/features/emoji/search.ts @@ -17,12 +17,12 @@ for (const [key, emoji] of sortedEmojis) { index.add('n' + key, `${emoji.id} ${emoji.name} ${emoji.keywords.join(' ')}`); } -export interface searchOptions { +interface searchOptions { maxResults?: number; custom?: any; } -export const addCustomToPool = (customEmojis: any[]) => { +const addCustomToPool = (customEmojis: any[]) => { // @ts-ignore for (const key in index.register) { if (key[0] === 'c') { @@ -71,4 +71,8 @@ const search = ( } }).filter(Boolean) as Emoji[]; -export default search; +export { + type searchOptions, + addCustomToPool, + search as default, +}; diff --git a/src/features/event/components/event-action-button.tsx b/src/features/event/components/event-action-button.tsx index 413942eed..b946ec47f 100644 --- a/src/features/event/components/event-action-button.tsx +++ b/src/features/event/components/event-action-button.tsx @@ -98,4 +98,4 @@ const EventActionButton: React.FC = ({ status, theme = 'secondary' ); }; -export default EventActionButton; +export { EventActionButton as default }; diff --git a/src/features/event/components/event-date.tsx b/src/features/event/components/event-date.tsx index 978f49213..f2951703e 100644 --- a/src/features/event/components/event-date.tsx +++ b/src/features/event/components/event-date.tsx @@ -56,4 +56,4 @@ const EventDate: React.FC = ({ status }) => { ); }; -export default EventDate; +export { EventDate as default }; diff --git a/src/features/event/components/event-header.tsx b/src/features/event/components/event-header.tsx index 6529b4af1..6214fcdf2 100644 --- a/src/features/event/components/event-header.tsx +++ b/src/features/event/components/event-header.tsx @@ -476,4 +476,4 @@ const EventHeader: React.FC = ({ status }) => { ); }; -export default EventHeader; +export { EventHeader as default }; diff --git a/src/features/event/event-discussion.tsx b/src/features/event/event-discussion.tsx index 2c762b8ad..5f845dbda 100644 --- a/src/features/event/event-discussion.tsx +++ b/src/features/event/event-discussion.tsx @@ -176,4 +176,4 @@ const EventDiscussion: React.FC = (props) => { ); }; -export default EventDiscussion; +export { EventDiscussion as default }; diff --git a/src/features/event/event-information.tsx b/src/features/event/event-information.tsx index d739220d3..618ae704e 100644 --- a/src/features/event/event-information.tsx +++ b/src/features/event/event-information.tsx @@ -201,4 +201,4 @@ const EventInformation: React.FC = ({ params }) => { ); }; -export default EventInformation; +export { EventInformation as default }; diff --git a/src/features/events/components/event-carousel.tsx b/src/features/events/components/event-carousel.tsx index e6e25f604..9c7fab129 100644 --- a/src/features/events/components/event-carousel.tsx +++ b/src/features/events/components/event-carousel.tsx @@ -80,4 +80,4 @@ const EventCarousel: React.FC = ({ statusIds, isLoading, emptyMe ); }; -export default EventCarousel; +export { EventCarousel as default }; diff --git a/src/features/events/index.tsx b/src/features/events/index.tsx index 831712ccf..cac3e9df1 100644 --- a/src/features/events/index.tsx +++ b/src/features/events/index.tsx @@ -65,4 +65,4 @@ const Events = () => { ); }; -export default Events; +export { Events as default }; diff --git a/src/features/export-data/components/csv-exporter.tsx b/src/features/export-data/components/csv-exporter.tsx index 4210c0a33..4590baf80 100644 --- a/src/features/export-data/components/csv-exporter.tsx +++ b/src/features/export-data/components/csv-exporter.tsx @@ -43,4 +43,4 @@ const CSVExporter: React.FC = ({ messages, action }) => { ); }; -export default CSVExporter; +export { CSVExporter as default }; diff --git a/src/features/export-data/index.tsx b/src/features/export-data/index.tsx index 27273c339..64037b40e 100644 --- a/src/features/export-data/index.tsx +++ b/src/features/export-data/index.tsx @@ -45,4 +45,4 @@ const ExportData = () => { ); }; -export default ExportData; +export { ExportData as default }; diff --git a/src/features/external-login/components/external-login-form.tsx b/src/features/external-login/components/external-login-form.tsx index f910826c3..414333095 100644 --- a/src/features/external-login/components/external-login-form.tsx +++ b/src/features/external-login/components/external-login-form.tsx @@ -94,4 +94,4 @@ const ExternalLoginForm: React.FC = () => { ); }; -export default ExternalLoginForm; +export { ExternalLoginForm as default }; diff --git a/src/features/external-login/index.tsx b/src/features/external-login/index.tsx index 5fe72045b..f6e57a617 100644 --- a/src/features/external-login/index.tsx +++ b/src/features/external-login/index.tsx @@ -12,4 +12,4 @@ const ExternalLoginPage: React.FC = () => ( ); -export default ExternalLoginPage; +export { ExternalLoginPage as default }; diff --git a/src/features/favourited-statuses/index.tsx b/src/features/favourited-statuses/index.tsx index a9a2aa0a1..db1291042 100644 --- a/src/features/favourited-statuses/index.tsx +++ b/src/features/favourited-statuses/index.tsx @@ -98,4 +98,4 @@ const Favourites: React.FC = ({ params }) => { ); }; -export default Favourites; \ No newline at end of file +export { Favourites as default }; \ No newline at end of file diff --git a/src/features/federation-restrictions/components/instance-restrictions.tsx b/src/features/federation-restrictions/components/instance-restrictions.tsx index 183f6a21b..2aa74b64e 100644 --- a/src/features/federation-restrictions/components/instance-restrictions.tsx +++ b/src/features/federation-restrictions/components/instance-restrictions.tsx @@ -153,4 +153,4 @@ const InstanceRestrictions: React.FC = ({ remoteInstance ); }; -export default InstanceRestrictions; +export { InstanceRestrictions as default }; diff --git a/src/features/federation-restrictions/components/restricted-instance.tsx b/src/features/federation-restrictions/components/restricted-instance.tsx index 07e017521..68a5b564b 100644 --- a/src/features/federation-restrictions/components/restricted-instance.tsx +++ b/src/features/federation-restrictions/components/restricted-instance.tsx @@ -43,4 +43,4 @@ const RestrictedInstance: React.FC = ({ host }) => { ); }; -export default RestrictedInstance; +export { RestrictedInstance as default }; diff --git a/src/features/federation-restrictions/index.tsx b/src/features/federation-restrictions/index.tsx index 47f5a218b..9b368ac4a 100644 --- a/src/features/federation-restrictions/index.tsx +++ b/src/features/federation-restrictions/index.tsx @@ -55,4 +55,4 @@ const FederationRestrictions = () => { ); }; -export default FederationRestrictions; +export { FederationRestrictions as default }; diff --git a/src/features/feed-suggestions/feed-suggestions.tsx b/src/features/feed-suggestions/feed-suggestions.tsx index f3e0da2b9..30217947a 100644 --- a/src/features/feed-suggestions/feed-suggestions.tsx +++ b/src/features/feed-suggestions/feed-suggestions.tsx @@ -118,4 +118,4 @@ const FeedSuggestions: React.FC = ({ statusId, onMoveUp, onMo ); }; -export default FeedSuggestions; +export { FeedSuggestions as default }; diff --git a/src/features/filters/edit-filter.tsx b/src/features/filters/edit-filter.tsx index 09ea0a4a8..3b45b295b 100644 --- a/src/features/filters/edit-filter.tsx +++ b/src/features/filters/edit-filter.tsx @@ -276,4 +276,4 @@ const EditFilter: React.FC = ({ params }) => { ); }; -export default EditFilter; +export { EditFilter as default }; diff --git a/src/features/filters/index.tsx b/src/features/filters/index.tsx index a4ae793b1..cc296697f 100644 --- a/src/features/filters/index.tsx +++ b/src/features/filters/index.tsx @@ -117,4 +117,4 @@ const Filters = () => { ); }; -export default Filters; +export { Filters as default }; diff --git a/src/features/follow-recommendations/index.tsx b/src/features/follow-recommendations/index.tsx index c2b204aac..26859ad9e 100644 --- a/src/features/follow-recommendations/index.tsx +++ b/src/features/follow-recommendations/index.tsx @@ -65,4 +65,4 @@ const FollowRecommendations: React.FC = () => { ); }; -export default FollowRecommendations; +export { FollowRecommendations as default }; diff --git a/src/features/follow-requests/components/account-authorize.tsx b/src/features/follow-requests/components/account-authorize.tsx index c6bc74a07..7e2019ae3 100644 --- a/src/features/follow-requests/components/account-authorize.tsx +++ b/src/features/follow-requests/components/account-authorize.tsx @@ -35,4 +35,4 @@ const AccountAuthorize: React.FC = ({ id }) => { ); }; -export default AccountAuthorize; +export { AccountAuthorize as default }; diff --git a/src/features/follow-requests/index.tsx b/src/features/follow-requests/index.tsx index f89681a01..8c3c965f5 100644 --- a/src/features/follow-requests/index.tsx +++ b/src/features/follow-requests/index.tsx @@ -54,4 +54,4 @@ const FollowRequests: React.FC = () => { ); }; -export default FollowRequests; +export { FollowRequests as default }; diff --git a/src/features/followed-tags/index.tsx b/src/features/followed-tags/index.tsx index 6745f5fc0..e04f84a02 100644 --- a/src/features/followed-tags/index.tsx +++ b/src/features/followed-tags/index.tsx @@ -49,4 +49,4 @@ const FollowedTags = () => { ); }; -export default FollowedTags; +export { FollowedTags as default }; diff --git a/src/features/followers/index.tsx b/src/features/followers/index.tsx index 8847beb11..6cec69f9c 100644 --- a/src/features/followers/index.tsx +++ b/src/features/followers/index.tsx @@ -67,4 +67,4 @@ const Followers: React.FC = ({ params }) => { ); }; -export default Followers; \ No newline at end of file +export { Followers as default }; \ No newline at end of file diff --git a/src/features/following/index.tsx b/src/features/following/index.tsx index f5c4c3475..cbd841cec 100644 --- a/src/features/following/index.tsx +++ b/src/features/following/index.tsx @@ -67,4 +67,4 @@ const Following: React.FC = ({ params }) => { ); }; -export default Following; \ No newline at end of file +export { Following as default }; \ No newline at end of file diff --git a/src/features/forms/index.tsx b/src/features/forms/index.tsx index 6907f8205..3de78ddc4 100644 --- a/src/features/forms/index.tsx +++ b/src/features/forms/index.tsx @@ -14,7 +14,7 @@ interface IInputContainer { children: React.ReactNode; } -export const InputContainer: React.FC = (props) => { +const InputContainer: React.FC = (props) => { const containerClass = clsx('input', { 'with_label': props.label, 'required': props.required, @@ -36,7 +36,7 @@ interface ILabelInputContainer { children: React.ReactNode; } -export const LabelInputContainer: React.FC = ({ label, hint, children }) => { +const LabelInputContainer: React.FC = ({ label, hint, children }) => { const [id] = useState(uuidv4()); const childrenWithProps = React.Children.map(children, child => ( // @ts-ignore: not sure how to get the right type here @@ -58,7 +58,7 @@ interface ILabelInput { label?: React.ReactNode; } -export const LabelInput: React.FC = ({ label, ...props }) => ( +const LabelInput: React.FC = ({ label, ...props }) => ( @@ -68,7 +68,7 @@ interface ILabelTextarea { label?: React.ReactNode; } -export const LabelTextarea: React.FC = ({ label, ...props }) => ( +const LabelTextarea: React.FC = ({ label, ...props }) => (