2
0
mirror of https://github.com/hibiken/asynqmon.git synced 2025-10-26 08:16:10 +08:00

Show error alert when data is not available

This commit is contained in:
Ken Hibino
2021-01-09 13:48:49 -08:00
parent 933127cc0e
commit 251b262798
13 changed files with 230 additions and 123 deletions

View File

@@ -8,6 +8,7 @@ import { RedisInfo } from "../api";
interface RedisInfoState {
loading: boolean;
error: string;
address: string;
data: RedisInfo | null;
rawData: string | null;
@@ -15,6 +16,7 @@ interface RedisInfoState {
const initialState: RedisInfoState = {
loading: false,
error: "",
address: "",
data: null,
rawData: null,
@@ -35,11 +37,13 @@ export default function redisInfoReducer(
return {
...state,
loading: false,
error: action.error,
};
case GET_REDIS_INFO_SUCCESS:
return {
loading: false,
error: "",
address: action.payload.address,
data: action.payload.info,
rawData: action.payload.raw_info,