mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-31 01:26:16 +00:00
Dejected project back to react-scripts, where posible
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { pipe, prop } from 'ramda';
|
||||
import { AxiosInstance } from 'axios';
|
||||
import { Dispatch } from 'redux';
|
||||
import { homepage } from '../../../package.json';
|
||||
import pack from '../../../package.json';
|
||||
import { hasServerData, ServerData } from '../data';
|
||||
import { createServers } from './servers';
|
||||
|
||||
@@ -11,7 +11,7 @@ const responseToServersList = pipe(
|
||||
);
|
||||
|
||||
export const fetchServers = ({ get }: AxiosInstance) => () => async (dispatch: Dispatch) => {
|
||||
const resp = await get(`${homepage}/servers.json`);
|
||||
const resp = await get(`${pack.homepage}/servers.json`);
|
||||
const remoteList = responseToServersList(resp);
|
||||
|
||||
dispatch(createServers(remoteList));
|
||||
|
||||
Reference in New Issue
Block a user