All files / publisher/pages/Builds LoggedOut.tsx

100% Statements 2/2
100% Branches 0/0
100% Functions 1/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86        1x   1x                                                                                                                                                              
import { useParams } from "react-router-dom";
import { Strip, Row, Col } from "@canonical/react-components";
 
function BuildsDefault() {
  const { snapId } = useParams();
 
  return (
    <>
      <div className="snapcraft-p-sticky js-sticky-bar">
        <div className="row">
          <ul className="p-inline-list u-no-margin--bottom">
            <li className="p-inline-list__item u-no-margin--right">
              Login to your GitHub account to start building.
            </li>
            <li className="p-inline-list__item">
              <a
                href={`/github/auth?back=/${snapId}/builds`}
                className="p-button--positive u-no-margin--bottom u-float-right"
              >
                <span>Log in </span>
                <i className="p-icon--github-white"></i>
              </a>
            </li>
          </ul>
        </div>
      </div>
      <div className="u-fixed-width">
        <hr className="u-no-margin--bottom" />
      </div>
      <Strip>
        <div className="u-fixed-width u-align--center u-hide--small u-hide--medium">
          <img
            src="https://assets.ubuntu.com/v1/ed6d1c5b-build.snapcraft.hero.svg"
            alt=""
            width="100%"
          />
        </div>
        <Row>
          <Col size={4} className="u-align-text--center">
            <img
              src="https://assets.ubuntu.com/v1/82de77b0-build.snapcraft.hero-01.svg"
              alt=""
              width="343"
              height="288"
              className="u-hide--large"
            />
            <p>
              Start by creating a repo and pushing your code to GitHub. Make
              sure that your repo includes a snapcraft.yaml file.
            </p>
          </Col>
          <Col size={4} className="u-align-text--center">
            <img
              src="https://assets.ubuntu.com/v1/275ddbf9-build.snapcraft.hero-02.svg"
              alt=""
              width="343"
              height="288"
              className="u-hide--large"
            />
            <p>
              Register a name on Snapcraft and attach it to your repo to start
              building. Your snap will be built automatically for all the
              distros.
            </p>
          </Col>
          <Col size={4} className="u-align-text--center">
            <img
              src="https://assets.ubuntu.com/v1/e708bab9-build.snapcraft.hero-03.svg"
              alt=""
              width="343"
              height="288"
              className="u-hide--large"
            />
            <p>
              Release your snap to your users. From here on, all the updates you
              do to your code will trigger automatic builds.
            </p>
          </Col>
        </Row>
      </Strip>
    </>
  );
}
 
export default BuildsDefault;