import React from "react";
import { Button, Result } from "antd";
import { useTranslation } from "react-i18next";
import InstanceRenderManager from "../../utils/instanceRenderMgr";

export default function ConflictComponent() {
  const { t } = useTranslation();
  return (
    <div>
      <Result
        status="warning"
        title={t("general.labels.instanceconflictitle")}
        extra={
          <div>
            <div>
              {t("general.labels.instanceconflictext", {
                app: InstanceRenderManager({
                  imex: "$t(titles.imexonline)",
                  rome: "$t(titles.romeonline)"
                })
              })}
            </div>
            <Button
              onClick={() => {
                window.location.reload();
              }}
            >
              {t("general.actions.refresh")}
            </Button>
          </div>
        }
      />
    </div>
  );
}
