Fixing typecheck + storybook:modules!
This commit is contained in:
Charles Bochet
2024-04-30 17:54:07 +02:00
committed by GitHub
parent 1b2ed80c1c
commit ccd1100773
14 changed files with 73 additions and 20 deletions

View File

@ -20,6 +20,7 @@ const meta: Meta<typeof SettingsAccountsEmailsBlocklistInput> = {
decorators: [ComponentDecorator, ClearMocksDecorator],
args: {
updateBlockedEmailList: updateBlockedEmailListJestFn,
blockedEmailOrDomainList: [],
},
argTypes: {
updateBlockedEmailList: { control: false },

View File

@ -1,28 +1,34 @@
import { DateTime } from 'luxon';
export const mockedBlocklist = [
import { BlocklistItem } from '@/accounts/types/BlocklistItem';
export const mockedBlocklist: BlocklistItem[] = [
{
id: '1',
handle: 'test1@twenty.com',
workspaceMemberId: '1',
createdAt: DateTime.now().minus({ hours: 2 }).toISO() ?? '',
__typename: 'BlocklistItem',
},
{
id: '2',
handle: 'test2@twenty.com',
workspaceMemberId: '1',
createdAt: DateTime.now().minus({ days: 2 }).toISO() ?? '',
__typename: 'BlocklistItem',
},
{
id: '3',
handle: 'test3@twenty.com',
workspaceMemberId: '1',
createdAt: DateTime.now().minus({ days: 3 }).toISO() ?? '',
__typename: 'BlocklistItem',
},
{
id: '4',
handle: '@twenty.com',
workspaceMemberId: '1',
createdAt: DateTime.now().minus({ days: 4 }).toISO() ?? '',
__typename: 'BlocklistItem',
},
];