diff --git a/.changeset/large-jars-fry.md b/.changeset/large-jars-fry.md new file mode 100644 index 0000000000..0da3f4302b --- /dev/null +++ b/.changeset/large-jars-fry.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-bazaar': patch +--- + +Link to the user catalog entity of a member diff --git a/.changeset/tough-seahorses-learn.md b/.changeset/tough-seahorses-learn.md index f0b6bcb70a..518b6b6967 100644 --- a/.changeset/tough-seahorses-learn.md +++ b/.changeset/tough-seahorses-learn.md @@ -2,7 +2,7 @@ '@backstage/plugin-bazaar-backend': minor --- -**BREAKING** The bazaar-backend createRouter now requires that the `identityApi` is passed to the router. +**BREAKING** The bazaar-backend `createRouter` now requires that the `identityApi` is passed to the router. These changes are **required** to `packages/backend/src/plugins/bazaar.ts` diff --git a/plugins/bazaar-backend/api-report.md b/plugins/bazaar-backend/api-report.md index d62453d156..1ee889c04a 100644 --- a/plugins/bazaar-backend/api-report.md +++ b/plugins/bazaar-backend/api-report.md @@ -5,6 +5,7 @@ ```ts import { Config } from '@backstage/config'; import express from 'express'; +import { IdentityApi } from '@backstage/plugin-auth-node'; import { Logger } from 'winston'; import { PluginDatabaseManager } from '@backstage/backend-common'; @@ -18,6 +19,8 @@ export interface RouterOptions { // (undocumented) database: PluginDatabaseManager; // (undocumented) + identity: IdentityApi; + // (undocumented) logger: Logger; } diff --git a/plugins/bazaar/src/components/CardContentFields/CardContentFields.tsx b/plugins/bazaar/src/components/CardContentFields/CardContentFields.tsx index 6c6ce1bb3e..641ae97f95 100644 --- a/plugins/bazaar/src/components/CardContentFields/CardContentFields.tsx +++ b/plugins/bazaar/src/components/CardContentFields/CardContentFields.tsx @@ -23,8 +23,11 @@ import { Typography, GridSize, } from '@material-ui/core'; +import { parseEntityRef } from '@backstage/catalog-model'; import { Avatar, Link } from '@backstage/core-components'; +import { useRouteRef } from '@backstage/core-plugin-api'; import { AboutField } from '@backstage/plugin-catalog'; +import { entityRouteRef } from '@backstage/plugin-catalog-react'; import { StatusTag } from '../StatusTag'; import { Member, BazaarProject } from '../../types'; @@ -49,6 +52,7 @@ export const CardContentFields = ({ membersSize, }: Props) => { const classes = useStyles(); + const catalogEntityRoute = useRouteRef(entityRouteRef); return (