import { useState, useEffect } from "react";

import { get } from "utils/HttpUtils"
import {GET_SYS_CHECKING} from "utils/ApiPathConst"

const DatabaseHealthCheck = () => {
    const [sysEnv, setSysEnv] = useState("'N/A");

    useEffect(() => {
        loadSysSetting();
    }, []);

    // useEffect(() => {
    //     setOnReady(true);
    // }, [locale]);

    const loadSysSetting = () => {
        get({
            url: GET_SYS_CHECKING,
            onSuccess: (responseData) => {
                // console.log(responseData)
                setSysEnv(responseData.sysEnv);
            }
        });
    }

    return (
        <div>{sysEnv}</div>
    );

}

export default DatabaseHealthCheck;