mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-20 05:26:20 +00:00
Fix shlink-web-component tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { pipe } from 'ramda';
|
||||
import { pipe, range } from 'ramda';
|
||||
import type { SyntheticEvent } from 'react';
|
||||
|
||||
type Optional<T> = T | null | undefined;
|
||||
@@ -9,3 +9,6 @@ export const handleEventPreventingDefault = <T>(handler: () => T) => pipe(
|
||||
(e: SyntheticEvent) => e.preventDefault(),
|
||||
handler,
|
||||
);
|
||||
|
||||
export const rangeOf = <T>(size: number, mappingFn: (value: number) => T, startAt = 1): T[] =>
|
||||
range(startAt, size + 1).map(mappingFn);
|
||||
|
||||
Reference in New Issue
Block a user