Skip to content

Commit b367349

Browse files
committed
fix datetime parsing
1 parent fdf9763 commit b367349

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

apps/events/test-script.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@ Config.setApiOrigin('https://testnet-api.geobrowser.io');
55

66
const BOUNTY_TYPE_ID = Id('327976dea5ad45769b83b7e7ec6337cf');
77
const REWARD_PROPERTY_ID = Id('e8e7301136354e84b46b767e7cd530a8');
8+
const ACTIVE_UNTIL_PROPERTY_ID = Id('3e4679aaeaf94bddaad825dd5d96234c');
89

910
const Bounty = Entity.Schema(
1011
{
1112
name: Type.String,
1213
description: Type.String,
1314
reward: Type.Number,
15+
activeUntil: Type.Date,
1416
},
1517
{
1618
types: [BOUNTY_TYPE_ID],
1719
properties: {
1820
name: SystemIds.NAME_PROPERTY,
1921
description: SystemIds.DESCRIPTION_PROPERTY,
2022
reward: REWARD_PROPERTY_ID,
23+
activeUntil: ACTIVE_UNTIL_PROPERTY_ID,
2124
},
2225
},
2326
);

packages/hypergraph/src/utils/convert-property-value.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const convertPropertyValue = (
4747
return property.time;
4848
}
4949
if (property.string != null) {
50-
return property.time;
50+
return property.string;
5151
}
5252
return undefined;
5353
}

0 commit comments

Comments
 (0)