mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-17 04:53:49 +00:00
Migrated to typescript the most complex reducer in the project
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { isNil } from 'ramda';
|
||||
import { ShortUrl } from '../data';
|
||||
import { OptionalString } from '../../utils/utils';
|
||||
|
||||
export const shortUrlMatches = (shortUrl, shortCode, domain) => {
|
||||
export const shortUrlMatches = (shortUrl: ShortUrl, shortCode: string, domain: OptionalString): boolean => {
|
||||
if (isNil(domain)) {
|
||||
return shortUrl.shortCode === shortCode && !shortUrl.domain;
|
||||
}
|
||||
Reference in New Issue
Block a user