Ensure that the GroupV1 Migration dialog shows

This commit is contained in:
Scott Nonnenberg 2022-07-15 14:50:02 -07:00 committed by GitHub
parent a2eac80034
commit 99d507a74d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 25 deletions

View File

@ -2519,11 +2519,6 @@ export async function startApp(): Promise<void> {
});
routineProfileRefresher.start();
} else {
assert(
false,
'Failed to fetch our conversation ID. Skipping routine profile refresh'
);
}
// Make sure we have the PNI identity

View File

@ -2,8 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import * as React from 'react';
import { isBoolean } from 'lodash';
import { boolean } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import type { PropsType } from './GroupV1MigrationDialog';
@ -34,21 +33,11 @@ const contact3: ConversationType = getDefaultConversation({
id: 'guid-3',
});
function booleanOr(value: boolean | undefined, defaultValue: boolean): boolean {
return isBoolean(value) ? value : defaultValue;
}
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
areWeInvited: boolean(
'areWeInvited',
booleanOr(overrideProps.areWeInvited, false)
),
areWeInvited: Boolean(overrideProps.areWeInvited),
droppedMembers: overrideProps.droppedMembers || [contact3, contact1],
getPreferredBadge: () => undefined,
hasMigrated: boolean(
'hasMigrated',
booleanOr(overrideProps.hasMigrated, false)
),
hasMigrated: Boolean(overrideProps.hasMigrated),
i18n,
invitedMembers: overrideProps.invitedMembers || [contact2],
migrate: action('migrate'),

View File

@ -6,7 +6,6 @@ import { Provider } from 'react-redux';
import type { Store } from 'redux';
import { ModalHost } from '../../components/ModalHost';
import type { PropsType } from '../smart/GroupV1MigrationDialog';
import { SmartGroupV1MigrationDialog } from '../smart/GroupV1MigrationDialog';
@ -14,13 +13,9 @@ export const createGroupV1MigrationModal = (
store: Store,
props: PropsType
): React.ReactElement => {
const { onClose } = props;
return (
<Provider store={store}>
<ModalHost onClose={onClose}>
<SmartGroupV1MigrationDialog {...props} />
</ModalHost>
<SmartGroupV1MigrationDialog {...props} />
</Provider>
);
};