Move ToastType to its own file to avoid importing electron in storybooks
This commit is contained in:
parent
daf66f33da
commit
15efbde23d
18 changed files with 57 additions and 49 deletions
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue