Created missing tests for settings components

This commit is contained in:
Alejandro Celaya
2021-09-20 21:23:39 +02:00
parent dc2f30c73b
commit b462169e1e
4 changed files with 124 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ const RealTimeUpdates = (
placeholder="Immediate"
disabled={!realTimeUpdates.enabled}
value={intervalValue(realTimeUpdates.interval)}
onChange={(e) => setRealTimeUpdatesInterval(Number(e.target.value))}
onChange={({ target }) => setRealTimeUpdatesInterval(Number(target.value))}
/>
{realTimeUpdates.enabled && (
<small className="form-text text-muted">

View File

@@ -12,7 +12,7 @@ export const SET_SETTINGS = 'shlink/realTimeUpdates/SET_SETTINGS';
* optional, as old instances of the app will load partial objects from local storage until it is saved again.
*/
interface RealTimeUpdatesSettings {
export interface RealTimeUpdatesSettings {
enabled: boolean;
interval?: number;
}