Migrated short URL helper modal components to TS

This commit is contained in:
Alejandro Celaya
2020-08-26 20:37:36 +02:00
parent b19bbee7fc
commit f283dc8569
14 changed files with 90 additions and 130 deletions

View File

@@ -1,15 +1,5 @@
import qs from 'qs';
import { isEmpty, isNil, reject } from 'ramda';
import PropTypes from 'prop-types';
export const apiErrorType = PropTypes.shape({
type: PropTypes.string,
detail: PropTypes.string,
title: PropTypes.string,
status: PropTypes.number,
error: PropTypes.string, // Deprecated
message: PropTypes.string, // Deprecated
});
const buildShlinkBaseUrl = (url, apiVersion) => url ? `${url}/rest/v${apiVersion}` : '';
const rejectNilProps = reject(isNil);

View File

@@ -22,4 +22,5 @@ export interface ProblemDetailsError {
status: number;
error?: string; // Deprecated
message?: string; // Deprecated
[extraProps: string]: any;
}