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);