@roadiehq/backstage-plugin-travis-ci
Version:
31 lines (28 loc) • 1.24 kB
JavaScript
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
import { useState, useCallback } from 'react';
import { Snackbar } from '@material-ui/core';
import { Builds as Builds$1 } from './lib/Builds/Builds.esm.js';
import { Alert } from '@material-ui/lab';
import { ContentHeader, SupportButton } from '@backstage/core-components';
const Builds = () => {
const [restarted, setRestarted] = useState(false);
const handleRestart = useCallback(() => {
setRestarted(true);
}, [setRestarted]);
return /* @__PURE__ */ jsxs(Fragment, { children: [
/* @__PURE__ */ jsx(
Snackbar,
{
autoHideDuration: 1e3,
open: restarted,
anchorOrigin: { vertical: "top", horizontal: "center" },
onClose: () => setRestarted(false),
children: /* @__PURE__ */ jsx(Alert, { severity: "success", children: "Build Restarted." })
}
),
/* @__PURE__ */ jsx(ContentHeader, { title: "All builds", children: /* @__PURE__ */ jsx(SupportButton, { children: "This plugin allows you to view and interact with your builds within the Travis CI environment." }) }),
/* @__PURE__ */ jsx(Builds$1, { onRestart: handleRestart })
] });
};
export { Builds };
//# sourceMappingURL=BuildsPage.esm.js.map