mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-23 15:06:17 +00:00
Replace remaining ramda references with shlinkio/data-manipulation
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { createAction, createSlice } from '@reduxjs/toolkit';
|
||||
import { memoizeWith } from '@shlinkio/data-manipulation';
|
||||
import type { ShlinkHealth } from '@shlinkio/shlink-web-component/api-contract';
|
||||
import { memoizeWith } from 'ramda';
|
||||
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
|
||||
import { createAsyncThunk } from '../../utils/helpers/redux';
|
||||
import { versionToPrintable, versionToSemVer as toSemVer } from '../../utils/helpers/version';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { PayloadAction, PrepareAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import { mergeDeepRight } from '@shlinkio/data-manipulation';
|
||||
import type { Theme } from '@shlinkio/shlink-frontend-kit';
|
||||
import type {
|
||||
Settings,
|
||||
@@ -8,7 +9,6 @@ import type {
|
||||
TagsSettings,
|
||||
VisitsSettings,
|
||||
} from '@shlinkio/shlink-web-component';
|
||||
import { mergeDeepRight } from 'ramda';
|
||||
import type { Defined } from '../../utils/types';
|
||||
|
||||
type ShortUrlsOrder = Defined<ShortUrlsListSettings['defaultOrdering']>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { memoizeWith } from '@shlinkio/data-manipulation';
|
||||
import { compare } from 'compare-versions';
|
||||
import { memoizeWith } from 'ramda';
|
||||
|
||||
export type Empty = null | undefined | '' | never[];
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import { range } from 'ramda';
|
||||
import type { SyntheticEvent } from 'react';
|
||||
|
||||
export const handleEventPreventingDefault = <T>(handler: () => T) => (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