Commit 7e3cdd68 authored by Joaquim Rocha's avatar Joaquim Rocha
Browse files

frontend: Remove lib/cluster module

This module was changed and now just exports a constant. That can be
done in the lib/util module instead.
parent fb859f71
Showing with 4 additions and 3 deletions
+4 -3
......@@ -4,7 +4,7 @@ import { useSnackbar } from 'notistack';
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
import { CLUSTER_ACTION_GRACE_PERIOD } from '../../lib/cluster';
import { CLUSTER_ACTION_GRACE_PERIOD } from '../../lib/util';
export default function ActionsNotifier() {
const { enqueueSnackbar, closeSnackbar } = useSnackbar();
......
export const CLUSTER_ACTION_GRACE_PERIOD = 5000; // ms
......@@ -7,6 +7,8 @@ TimeAgo.addLocale(en);
const TIME_AGO = new TimeAgo();
export const CLUSTER_ACTION_GRACE_PERIOD = 5000; // ms
export function timeAgo(date) {
return TIME_AGO.format(new Date(date), 'time');
}
......
import { all, call, cancelled, delay, put, race, take, takeEvery } from 'redux-saga/effects';
import { CLUSTER_ACTION_GRACE_PERIOD } from '../../lib/cluster';
import { CLUSTER_ACTION_GRACE_PERIOD } from '../../lib/util';
import { CLUSTER_ACTION, CLUSTER_ACTION_CANCEL, updateClusterAction } from '../actions/actions';
function newActionKey() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment