{"size": 830, "ext": "js", "max_stars_repo_path": "src/components/SignIn.js", "max_stars_repo_name": "0xAlchemist/flow-client-template", "max_stars_repo_stars_event_min_datetime": "2021-01-14T18:36:41.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-14T19:44:43.000Z", "max_issues_repo_path": "src/components/SignIn.js", "max_issues_repo_name": "0xAlchemist/flow-client-template", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/SignIn.js", "max_forks_repo_name": "0xAlchemist/flow-client-template", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.7142857143, "max_line_length": 74, "alphanum_fraction": 0.6253012048}
import React from "react";
import { Hero, Container, Heading, Button } from "react-bulma-components";

import fcl from "../flow/config";

const runGetLatestBlock = async () => {
  const response = await fcl.send([
    fcl.script`
      pub fun main(): UInt64 {
        return getLatestBlock().height
      }
    `,
  ]);

  setBlockData(await fcl.decode(response));
  console.log({ blockData });
};

window.fcl;
window.runGetLatestBlock = runGetLatestBlock;

export const SignIn = () => (
  <Hero color="primary" size="fullheight">
    <Hero.Body className="has-text-centered">
      <Container>
        <Heading>0xAlchemist's</Heading>
        <Heading subtitle size={3}>
          Flow Lab
        </Heading>
        <Button onClick={fcl.authenticate}>Sign In / Sign Up</Button>
      </Container>
    </Hero.Body>
  </Hero>
);
