Skip to content

Commit fb29a89

Browse files
aspiersClaude Code
andcommitted
fix(sdk-react): use HypercertProject instead of HypercertProjectWithMetadata in Project type
Without this patch, the Project type defined the record property as HypercertProjectWithMetadata, but the useProjects and useProject hooks were creating objects with record: HypercertProject. This caused TypeScript errors because HypercertProjectWithMetadata is not a nested structure with uri/cid/record properties. This was a problem because the type mismatch prevented the sdk-react package from passing typecheck, blocking development and builds. This patch solves the problem by: - Importing HypercertProject from @hypercerts-org/sdk-core - Changing the Project type to use record: HypercertProject - Removing the unused HypercertProjectWithMetadata import and re-export The HypercertProject type correctly represents a project record without the resolved metadata fields, matching what the hooks actually return. Co-authored-by: Claude Code <claude-code@noreply.anthropic.com>
1 parent 750cd44 commit fb29a89

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/sdk-react/src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {
1414
CreateOrganizationParams,
1515
CreateProjectParams,
1616
HypercertClaim,
17-
HypercertProjectWithMetadata,
17+
HypercertProject,
1818
OrganizationInfo,
1919
OrgHypercertsDefs,
2020
Repository,
@@ -396,7 +396,7 @@ export interface UseHypercertResult {
396396
export type Project = {
397397
uri: string;
398398
cid: string;
399-
record: HypercertProjectWithMetadata;
399+
record: HypercertProject;
400400
};
401401

402402
/**
@@ -502,7 +502,7 @@ export type {
502502
CreateOrganizationParams,
503503
CreateProjectParams,
504504
HypercertClaim,
505-
HypercertProjectWithMetadata,
505+
HypercertProject,
506506
OrganizationInfo,
507507
OrgHypercertsDefs,
508508
Repository,

0 commit comments

Comments
 (0)