diff --git a/src/short-urls/helpers/CreateShortUrlResult.tsx b/src/short-urls/helpers/CreateShortUrlResult.tsx index 5dfdb971..a9134e7c 100644 --- a/src/short-urls/helpers/CreateShortUrlResult.tsx +++ b/src/short-urls/helpers/CreateShortUrlResult.tsx @@ -11,11 +11,11 @@ import './CreateShortUrlResult.scss'; export interface CreateShortUrlResultProps extends ShortUrlCreation { resetCreateShortUrl: () => void; - canBeClosed: boolean; + canBeClosed?: boolean; } const CreateShortUrlResult = (useStateFlagTimeout: StateFlagTimeout) => ( - { error, result, resetCreateShortUrl, canBeClosed }: CreateShortUrlResultProps, + { error, result, resetCreateShortUrl, canBeClosed = false }: CreateShortUrlResultProps, ) => { const [ showCopyTooltip, setShowCopyTooltip ] = useStateFlagTimeout(); diff --git a/test/short-urls/Paginator.test.tsx b/test/short-urls/Paginator.test.tsx index 2ca5b4fa..d85a9ebe 100644 --- a/test/short-urls/Paginator.test.tsx +++ b/test/short-urls/Paginator.test.tsx @@ -16,6 +16,7 @@ describe('', () => { const paginator = { currentPage: 1, pagesCount: 5, + totalItems: 10, }; const extraPagesPrevNext = 2; const expectedItems = paginator.pagesCount + extraPagesPrevNext; diff --git a/test/visits/reducers/shortUrlVisits.test.ts b/test/visits/reducers/shortUrlVisits.test.ts index 8863f4f1..1e33c5b9 100644 --- a/test/visits/reducers/shortUrlVisits.test.ts +++ b/test/visits/reducers/shortUrlVisits.test.ts @@ -125,6 +125,7 @@ describe('shortUrlVisitsReducer', () => { pagination: { currentPage: 1, pagesCount: 1, + totalItems: 1, }, })); @@ -144,6 +145,7 @@ describe('shortUrlVisitsReducer', () => { pagination: { currentPage: page, pagesCount: expectedRequests, + totalItems: 1, }, })); diff --git a/test/visits/reducers/tagVisits.test.ts b/test/visits/reducers/tagVisits.test.ts index caf300bb..30304001 100644 --- a/test/visits/reducers/tagVisits.test.ts +++ b/test/visits/reducers/tagVisits.test.ts @@ -124,6 +124,7 @@ describe('tagVisitsReducer', () => { pagination: { currentPage: 1, pagesCount: 1, + totalItems: 1, }, }));