Created component holding the logic to render Shlink API errors

This commit is contained in:
Alejandro Celaya
2020-12-21 21:19:02 +01:00
parent f69f791790
commit 51379eb2a0
9 changed files with 43 additions and 39 deletions

View File

@@ -18,6 +18,8 @@ import {
ShlinkVisitsOverview,
} from './types';
// TODO Move this file to api module
const buildShlinkBaseUrl = (url: string, apiVersion: number) => url ? `${url}/rest/v${apiVersion}` : '';
const rejectNilProps = reject(isNil);

View File

@@ -4,6 +4,8 @@ import { hasServerData, SelectedServer, ServerWithId } from '../../servers/data'
import { GetState } from '../../container/types';
import ShlinkApiClient from './ShlinkApiClient';
// TODO Move this file to api module
const apiClients: Record<string, ShlinkApiClient> = {};
const isGetState = (getStateOrSelectedServer: GetState | ServerWithId): getStateOrSelectedServer is GetState =>

View File

@@ -2,6 +2,8 @@ import { Visit } from '../../visits/types'; // FIXME Should be defined as part o
import { ShortUrl, ShortUrlMeta } from '../../short-urls/data'; // FIXME Should be defined as part of this module
import { OptionalString } from '../utils';
// TODO Move this file to api module
export interface ShlinkShortUrlsResponse {
data: ShortUrl[];
pagination: ShlinkPaginator;