Merge branch 'master' of github.com:spotify/backstage into blam/react-router

* 'master' of github.com:spotify/backstage: (89 commits)
  Use URLSearchParams
  Use location?.type once more
  chore(catalog): clean up CatalogTable, use only Entity
  chore(catalog): clean up ComponentPage, use only Entity
  chore(catalog): tweak getEntityByName a bit, handle 404s properly
  chore(catalog/star): only set the cache if there are entries from the response
  chore(catalog/star): added a comment about why we are using a simple cache here
  chore(catalog/star): removing msw dependency, wrong branch
  chore(catalog): consistent use of named exports
  chore(msw): Added msw dependency
  chore(catalog/star): fixing issues with unmocked deps
  chore(catalog/star): adding a simple cache to stop flicker as a stopgap
  chore(catalog/star): reworking how the starring works, it now stores uri sort of references for entities
  fix(core): Tabs useEffect dependency list
  docs: format with prettier (#1218)
  Optional namespace and name as one part of URL
  docs/auth: added overview, oauth description and glossary
  docs: added plantuml generation script
  docs: added prettier config
  Remove deleted UserBadge component from Sidebar story
  ...
This commit is contained in:
blam
2020-06-11 17:36:19 +02:00
228 changed files with 6516 additions and 3129 deletions
@@ -68,7 +68,7 @@ const AuditLinkList: FC<AuditLinkListProps> = ({
component="nav"
aria-label="lighthouse audit history"
>
{audits.map((audit) => (
{audits.map(audit => (
<ListItem
key={audit.id}
selected={audit.id === selectedId}
@@ -88,7 +88,7 @@ const AuditLinkList: FC<AuditLinkListProps> = ({
const AuditView: FC<{ audit?: Audit }> = ({ audit }: { audit?: Audit }) => {
const classes = useStyles();
const params = useParams<{ id: string }>();
const params = useParams() as { id: string };
const { url: lighthouseUrl } = useApi(lighthouseApiRef);
if (audit?.status === 'RUNNING') return <Progress />;
@@ -114,7 +114,7 @@ const AuditView: FC<{ audit?: Audit }> = ({ audit }: { audit?: Audit }) => {
const ConnectedAuditView: FC<{}> = () => {
const lighthouseApi = useApi(lighthouseApiRef);
const params = useParams<{ id: string }>();
const params = useParams() as { id: string };
const classes = useStyles();
const { loading, error, value: nextValue } = useAsync<Website>(
@@ -136,7 +136,7 @@ const ConnectedAuditView: FC<{}> = () => {
<AuditLinkList audits={value?.audits} selectedId={params.id} />
</Grid>
<Grid item xs={9}>
<AuditView audit={value?.audits.find((a) => a.id === params.id)} />
<AuditView audit={value?.audits.find(a => a.id === params.id)} />
</Grid>
</Grid>
);