Move ToastType to its own file to avoid importing electron in storybooks

This commit is contained in:
Jamie Kyle 2022-12-14 16:48:36 -08:00 committed by GitHub
parent daf66f33da
commit 15efbde23d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 57 additions and 49 deletions

View file

@ -12,7 +12,7 @@ import type {
ReplacementValuesType,
ThemeType,
} from '../types/Util';
import { ToastType } from '../state/ducks/toast';
import { ToastType } from '../types/Toast';
import { filterAndSortConversationsByRecent } from '../util/filterAndSortConversations';
import { ConfirmationDialog } from './ConfirmationDialog';
import type { Row } from './ConversationList';

View file

@ -8,7 +8,7 @@ import classNames from 'classnames';
import type { ExecuteMenuRoleType } from './TitleBarContainer';
import type { MenuOptionsType, MenuActionType } from '../types/menu';
import type { ToastType } from '../state/ducks/toast';
import type { ToastType } from '../types/Toast';
import type { ViewStoryActionCreatorType } from '../state/ducks/stories';
import type { ReplacementValuesType } from '../types/Util';
import { ThemeType } from '../types/Util';

View file

@ -6,7 +6,7 @@ import React from 'react';
import * as Errors from '../types/errors';
import * as log from '../logging/log';
import { ToastType } from '../state/ducks/toast';
import { ToastType } from '../types/Toast';
export type Props = {
children: ReactNode;

View file

@ -27,7 +27,7 @@ import { Modal } from './Modal';
import { PanelRow } from './conversation/conversation-details/PanelRow';
import type { ProfileDataType } from '../state/ducks/conversations';
import { UsernameEditState } from '../state/ducks/usernameEnums';
import { ToastType } from '../state/ducks/toast';
import { ToastType } from '../types/Toast';
import type { ShowToastActionCreatorType } from '../state/ducks/toast';
import { getEmojiData, unifiedToEmoji } from './emoji/lib';
import { assertDev } from '../util/assert';

View file

@ -8,7 +8,7 @@ import type { LocalizerType } from '../types/Util';
import type { ShowToastActionCreatorType } from '../state/ducks/toast';
import { ContextMenu } from './ContextMenu';
import { Theme } from '../util/theme';
import { ToastType } from '../state/ducks/toast';
import { ToastType } from '../types/Toast';
import {
isVideoGoodForStories,
ReasonVideoNotGood,

View file

@ -43,7 +43,7 @@ import {
} from '../types/Stories';
import { StoryViewsNRepliesModal } from './StoryViewsNRepliesModal';
import { Theme } from '../util/theme';
import { ToastType } from '../state/ducks/toast';
import { ToastType } from '../types/Toast';
import { getAvatarColor } from '../types/Colors';
import { getStoryBackground } from '../util/getStoryBackground';
import { getStoryDuration } from '../util/getStoryDuration';

View file

@ -7,7 +7,7 @@ import React from 'react';
import type { PropsType } from './ToastManager';
import enMessages from '../../_locales/en/messages.json';
import { ToastManager } from './ToastManager';
import { ToastType } from '../state/ducks/toast';
import { ToastType } from '../types/Toast';
import { setupI18n } from '../util/setupI18n';
const i18n = setupI18n('en', enMessages);

View file

@ -6,8 +6,8 @@ import type { LocalizerType, ReplacementValuesType } from '../types/Util';
import { SECOND } from '../util/durations';
import { Toast } from './Toast';
import { ToastMessageBodyTooLong } from './ToastMessageBodyTooLong';
import { ToastType } from '../state/ducks/toast';
import { missingCaseError } from '../util/missingCaseError';
import { ToastType } from '../types/Toast';
export type PropsType = {
hideToast: () => unknown;