mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-01 13:16:42 +00:00
Fix mercure info loading in shlink-web-component
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { FC } from 'react';
|
||||
import { useEffect } from 'react';
|
||||
import type { Settings } from '../../shlink-web-component';
|
||||
import { ShlinkWebComponent } from '../../shlink-web-component';
|
||||
import type { Settings } from '../../shlink-web-component/utils/settings';
|
||||
import type { ShlinkApiClientBuilder } from '../api/services/ShlinkApiClientBuilder';
|
||||
import { isReachableServer } from '../servers/data';
|
||||
import { withSelectedServer } from '../servers/helpers/withSelectedServer';
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createAction, createListenerMiddleware, createSlice } from '@reduxjs/toolkit';
|
||||
import { createAction, createSlice } from '@reduxjs/toolkit';
|
||||
import { memoizeWith, pipe } from 'ramda';
|
||||
import type { ShlinkHealth } from '../../../shlink-web-component/api-contract';
|
||||
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
|
||||
import type { ShlinkHealth } from '../../api/types';
|
||||
import { createAsyncThunk } from '../../utils/helpers/redux';
|
||||
import { versionToPrintable, versionToSemVer as toSemVer } from '../../utils/helpers/version';
|
||||
import type { SelectedServer, ServerWithId } from '../data';
|
||||
import { isReachableServer } from '../data';
|
||||
|
||||
const REDUCER_PREFIX = 'shlink/selectedServer';
|
||||
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
import classNames from 'classnames';
|
||||
import { FormGroup, Input } from 'reactstrap';
|
||||
import type { Settings } from '../../shlink-web-component';
|
||||
import { FormText } from '../utils/forms/FormText';
|
||||
import { LabeledFormGroup } from '../utils/forms/LabeledFormGroup';
|
||||
import { useDomId } from '../utils/helpers/hooks';
|
||||
import { SimpleCard } from '../utils/SimpleCard';
|
||||
import { ToggleSwitch } from '../utils/ToggleSwitch';
|
||||
import type { Settings } from './reducers/settings';
|
||||
|
||||
interface RealTimeUpdatesProps {
|
||||
type RealTimeUpdatesProps = {
|
||||
settings: Settings;
|
||||
toggleRealTimeUpdates: (enabled: boolean) => void;
|
||||
setRealTimeUpdatesInterval: (interval: number) => void;
|
||||
}
|
||||
};
|
||||
|
||||
const intervalValue = (interval?: number) => (!interval ? '' : `${interval}`);
|
||||
|
||||
export const RealTimeUpdatesSettings = (
|
||||
{ settings: { realTimeUpdates }, toggleRealTimeUpdates, setRealTimeUpdatesInterval }: RealTimeUpdatesProps,
|
||||
{ settings, toggleRealTimeUpdates, setRealTimeUpdatesInterval }: RealTimeUpdatesProps,
|
||||
) => {
|
||||
const { realTimeUpdates = { enabled: true } } = settings;
|
||||
const inputId = useDomId();
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user