{"size": 1284, "ext": "js", "max_stars_repo_path": "packages/trainera.de/pages/private/settings.js", "max_stars_repo_name": "ondrejsika/ondrejsikawebs", "max_stars_repo_stars_event_min_datetime": "2019-08-19T14:58:30.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-04T19:32:04.000Z", "max_issues_repo_path": "packages/trainera.cz/pages/private/settings.js", "max_issues_repo_name": "ondrejsika/ondrejsikawebs", "max_issues_repo_issues_event_min_datetime": "2019-08-10T10:50:29.000Z", "max_issues_repo_issues_event_max_datetime": "2020-04-05T18:05:08.000Z", "max_forks_repo_path": "packages/ondrej-sika.cz/pages/private/settings.js", "max_forks_repo_name": "ondrejsika/ondrejsikawebs", "max_forks_repo_forks_event_min_datetime": "2019-04-09T19:28:02.000Z", "max_forks_repo_forks_event_max_datetime": "2020-04-08T08:20:22.000Z"}
{"max_stars_count": 2, "max_issues_count": 9, "max_forks_count": 4, "avg_line_length": 24.2264150943, "max_line_length": 80, "alphanum_fraction": 0.5366043614}
import React from "react";
import Head from "next/head";

import { useCookie } from "@app/common/components/AustraliaOnFireBar/useCookie";

let Bar = (props) => (
  <div style={{ backgroundColor: props.color, padding: "15px", width: 100 }}>
    {props.children}
  </div>
);

const Page = () => {
  const [hideBar, setHideBar] = useCookie("AustraliaFiresBarhideBar");
  const [hideBarCorona, setHideBarCorona] = useCookie("CoronaBarHide");

  return (
    <div className="container">
      <Head>
        <title>Website Settings - Ondřej Šika</title>
      </Head>
      <h1>Website Settings</h1>
      <h2>Australia Fires Bar</h2>
      {hideBar ? (
        <Bar color="lightgray">off</Bar>
      ) : (
        <Bar color="lightgreen">on</Bar>
      )}
      <a href="#" onClick={() => setHideBar(true)}>
        hide
      </a>
      {` `}
      <a href="#" onClick={() => setHideBar("")}>
        show
      </a>
      <h2>Corona Bar</h2>
      {hideBarCorona ? (
        <Bar color="lightgray">off</Bar>
      ) : (
        <Bar color="lightgreen">on</Bar>
      )}
      <a href="#" onClick={() => setHideBarCorona(true)}>
        hide
      </a>
      {` `}
      <a href="#" onClick={() => setHideBarCorona("")}>
        show
      </a>
    </div>
  );
};

export default Page;
