diff --git a/apps/connect/src/routes/index.tsx b/apps/connect/src/routes/index.tsx index bbff8d1e..66f29a0d 100644 --- a/apps/connect/src/routes/index.tsx +++ b/apps/connect/src/routes/index.tsx @@ -2,6 +2,7 @@ import { CreateSpaceCard } from '@/components/CreateSpaceCard'; import { SpacesCard } from '@/components/SpacesCard'; import { Loading } from '@/components/ui/Loading'; import { usePrivateSpaces } from '@/hooks/use-private-spaces'; +import { usePublicSpaces } from '@/hooks/use-public-spaces'; import { useIdentityToken } from '@privy-io/react-auth'; import { createFileRoute } from '@tanstack/react-router'; @@ -27,15 +28,24 @@ function Index() { function Authorized() { const { isPending: privateSpacesPending, error: privateSpacesError, data: privateSpacesData } = usePrivateSpaces(); + const { + isPending: publicSpacesPending, + error: publicSpacesError, + data: publicSpacesData, + } = usePublicSpaces(import.meta.env.VITE_HYPERGRAPH_API_URL); return (
diff --git a/apps/events/src/components/create-events.tsx b/apps/events/src/components/create-events.tsx index 408aa2ce..cbdbec24 100644 --- a/apps/events/src/components/create-events.tsx +++ b/apps/events/src/components/create-events.tsx @@ -1,6 +1,7 @@ import { Graph, type Op } from '@graphprotocol/grc-20'; import type { Connect } from '@graphprotocol/hypergraph'; import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react'; +import { mapping } from '../mapping'; import { Button } from './ui/button'; const createEvents = async ({ @@ -12,10 +13,10 @@ const createEvents = async ({ const { id: jobOfferTypeId, ops: createJobOfferTypeOps } = Graph.createEntity({ name: 'My Test Job Offer', - types: ['a107c081-3089-4a94-8208-6a10775557d2'], + types: mapping.JobOffer.typeIds, values: [ { - property: '20d18713-5352-4e1f-987c-d853bf9f8831', + property: mapping.JobOffer.properties?.salary as string, value: '80000', }, ], @@ -24,10 +25,10 @@ const createEvents = async ({ const { id: jobOfferTypeId2, ops: createJobOfferTypeOps2 } = Graph.createEntity({ name: 'My Test Job Offer 2', - types: ['a107c081-3089-4a94-8208-6a10775557d2'], + types: mapping.JobOffer.typeIds, values: [ { - property: '20d18713-5352-4e1f-987c-d853bf9f8831', + property: mapping.JobOffer.properties?.salary as string, value: '90000', }, ], @@ -39,18 +40,18 @@ const createEvents = async ({ const { id: companyTypeId, ops: createCompanyTypeOps } = Graph.createEntity({ name: 'My Test Company', - types: ['e8932986-67a9-4fff-89a6-07f03973014c'], + types: mapping.Company.typeIds, relations: { - '96beadca-0846-4e56-9628-c196f7f3c4cd': [{ toEntity: jobOfferTypeId }, { toEntity: jobOfferTypeId2 }], + [mapping.Company.relations?.jobOffers as string]: [{ toEntity: jobOfferTypeId }, { toEntity: jobOfferTypeId2 }], }, }); ops.push(...createCompanyTypeOps); const { ops: createEventTypeOps } = Graph.createEntity({ name: 'My Test Event', - types: ['6b8dbe76-389f-4bde-acdd-db9d5e387882'], + types: mapping.Event.typeIds, relations: { - 'd8e4ea54-cb8c-4dca-9c2b-64dbbbe78397': [{ toEntity: companyTypeId }], + [mapping.Event.relations?.sponsors as string]: [{ toEntity: companyTypeId }], }, }); ops.push(...createEventTypeOps);