Enregistrement et affichage d'un flux d'évènements
- Ajout d'une nouvelle entité "Event" - Affichage d'une "timeline" sur le tableau de bord - Création semi-automatique des évènements lors des modifications par les utilisateurs
This commit is contained in:
24
client/src/components/WorkgroupLink.tsx
Normal file
24
client/src/components/WorkgroupLink.tsx
Normal file
@ -0,0 +1,24 @@
|
||||
import React, { FunctionComponent } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useWorkgroups } from "../gql/queries/workgroups";
|
||||
|
||||
export interface WorkgroupLinkProps {
|
||||
workgroupId: number
|
||||
}
|
||||
|
||||
export const WorkgroupLink: FunctionComponent<WorkgroupLinkProps> = ({ workgroupId }) => {
|
||||
const { workgroups } = useWorkgroups({
|
||||
fetchPolicy: "cache-first",
|
||||
variables: {
|
||||
filter: {
|
||||
ids: [workgroupId]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const workgroupName = workgroups.length > 0 ? workgroups[0].name : `#${workgroupId}`;
|
||||
|
||||
return (
|
||||
<Link to={`/workgroups/${workgroupId}`}>{workgroupName}</Link>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user