File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { Bounty } from '@/schema' ;
12import { useEntities } from '@graphprotocol/hypergraph-react' ;
23import { createLazyFileRoute } from '@tanstack/react-router' ;
3- import { Bounty } from '@/schema' ;
44
55export const Route = createLazyFileRoute ( '/bounties' ) ( {
66 component : RouteComponent ,
@@ -19,6 +19,9 @@ function RouteComponent() {
1919 filter : {
2020 interestedIn : { entityId : PERSON_ENTITY_ID } ,
2121 } ,
22+ include : {
23+ allocated : { } ,
24+ } ,
2225 } ) ;
2326
2427 return (
@@ -37,6 +40,9 @@ function RouteComponent() {
3740 < h2 className = "font-semibold" > { bounty . name } </ h2 >
3841 { bounty . description && < p className = "text-sm text-gray-600" > { bounty . description } </ p > }
3942 < p className = "text-xs text-gray-400 mt-1" > { bounty . id } </ p >
43+ < p className = "text-xs text-gray-400 mt-1" >
44+ Allocated to: { bounty . allocated . map ( ( allocated ) => allocated . name ) . join ( ', ' ) }
45+ </ p >
4046 </ li >
4147 ) ) }
4248 </ ul >
Original file line number Diff line number Diff line change @@ -372,18 +372,22 @@ export const PersonBacklink = Entity.Schema(
372372 } ,
373373) ;
374374
375+ export const ALLOCATED_PROPERTY_ID = Id ( 'cfeb642223c54df4b3f9375a489d9e22' ) ;
376+
375377export const Bounty = Entity . Schema (
376378 {
377379 name : Type . String ,
378380 description : Type . optional ( Type . String ) ,
379381 interestedIn : Type . Backlink ( PersonBacklink ) ,
382+ allocated : Type . Relation ( PersonBacklink ) ,
380383 } ,
381384 {
382385 types : [ Id ( '808af0bad5884e3391f09dd4b25e18be' ) ] ,
383386 properties : {
384387 name : Id ( SystemIds . NAME_PROPERTY ) ,
385388 description : Id ( SystemIds . DESCRIPTION_PROPERTY ) ,
386389 interestedIn : Id ( 'ff7e1b4444a2419187324e6c222afe07' ) ,
390+ allocated : ALLOCATED_PROPERTY_ID ,
387391 } ,
388392 } ,
389393) ;
You can’t perform that action at this time.
0 commit comments