import React from "react";
import { getTranslation } from "../core/i18n/I18NHandler";
import { Button } from "@geist-ui/core";

const redirectToPage = (redirectLoc) => {
  window.location.href = "./" + redirectLoc;
};

function InfoPageComponent({ children, redirectLoc }) {
  return (
    <div>
      {children}
      <div style={{ width: "fit-content", margin: "40px auto" }}>
        <Button
          onClick={() => {
            redirectToPage(redirectLoc);
          }}
        >
          {getTranslation("continue")}
        </Button>
      </div>
    </div>
  );
}

export default InfoPageComponent;
