frontend client for gemstone. decentralised workplace app

refactor: expose cid as well

serenity f107ba13 69fd0fac

+1 -5
src/queries/get-channels-from-pds.ts
···
if (!success) return { ok: false, error: z.treeifyError(error) };
-
allRecords.push(
-
...responses.map((data) => {
-
return data;
-
}),
-
);
+
allRecords.push(...responses);
if (records.length < 100) continueLoop = false;
cursor = nextCursor;
+4 -5
src/queries/get-invites-from-pds.ts
···
}): Promise<
Result<
Array<{
+
cid: string;
uri: string;
value: SystemsGmstnDevelopmentChannelInvite;
}>,
···
}): Promise<
Result<
Array<{
+
cid: string;
uri: string;
value: SystemsGmstnDevelopmentChannelInvite;
}>,
···
>
> => {
const allRecords: Array<{
+
cid: string;
uri: string;
value: SystemsGmstnDevelopmentChannelInvite;
}> = [];
···
.safeParse(records);
if (!success) return { ok: false, error: z.treeifyError(error) };
-
allRecords.push(
-
...responses.map((data) => {
-
return { uri: data.uri, value: data.value };
-
}),
-
);
+
allRecords.push(...responses);
if (records.length < 100) continueLoop = false;
cursor = nextCursor;
+4 -5
src/queries/get-lattices-from-pds.ts
···
}): Promise<
Result<
Array<{
+
cid: string;
uri: string;
value: SystemsGmstnDevelopmentLattice;
}>,
···
}): Promise<
Result<
Array<{
+
cid: string;
uri: string;
value: SystemsGmstnDevelopmentLattice;
}>,
···
>
> => {
const allRecords: Array<{
+
cid: string;
uri: string;
value: SystemsGmstnDevelopmentLattice;
}> = [];
···
if (!success) return { ok: false, error: z.treeifyError(error) };
-
allRecords.push(
-
...responses.map((data) => {
-
return { uri: data.uri, value: data.value };
-
}),
-
);
+
allRecords.push(...responses);
if (records.length < 100) continueLoop = false;
cursor = nextCursor;
+4 -5
src/queries/get-shards-from-pds.ts
···
}): Promise<
Result<
Array<{
+
cid: string;
uri: string;
value: SystemsGmstnDevelopmentShard;
}>,
···
}): Promise<
Result<
Array<{
+
cid: string;
uri: string;
value: SystemsGmstnDevelopmentShard;
}>,
···
>
> => {
const allRecords: Array<{
+
cid: string;
uri: string;
value: SystemsGmstnDevelopmentShard;
}> = [];
···
if (!success) return { ok: false, error: z.treeifyError(error) };
-
allRecords.push(
-
...responses.map((data) => {
-
return { uri: data.uri, value: data.value };
-
}),
-
);
+
allRecords.push(...responses);
if (records.length < 100) continueLoop = false;
cursor = nextCursor;
+1 -1
src/queries/hooks/useLatticesQuery.ts
···
collection: convertResult.data.collection,
rKey: convertResult.data.rKey,
};
-
return { uri, value: record.value };
+
return { cid: record.cid, uri, value: record.value };
})
.filter((atUri) => atUri !== undefined);
+1 -1
src/queries/hooks/useShardsQuery.ts
···
collection: convertResult.data.collection,
rKey: convertResult.data.rKey,
};
-
return { uri, value: record.value };
+
return { cid: record.cid, uri, value: record.value };
})
.filter((atUri) => atUri !== undefined);