frontend client for gemstone. decentralised workplace app

refactor: rename variable

serenity a9956608 b77d5d69

Changed files
+8 -8
src
components
+2 -2
src/components/Settings/LatticeInfo.tsx
···
import { View } from "react-native";
export const LatticeInfo = ({
-
shard,
}: {
-
shard: {
uri: Required<AtUri>;
value: SystemsGmstnDevelopmentLattice;
};
···
import { View } from "react-native";
export const LatticeInfo = ({
+
lattice: shard,
}: {
+
lattice: {
uri: Required<AtUri>;
value: SystemsGmstnDevelopmentLattice;
};
+6 -6
src/components/Settings/LatticeSettings.tsx
···
marginLeft: 8,
}}
>
-
{lattices.map((shard, idx) => (
-
<LatticeInfo key={idx} shard={shard} />
))}
</View>
</View>
···
};
const latticeQueryFn = async (session: OAuthSession) => {
-
const shards = await getUserLattices({
pdsEndpoint: session.serverMetadata.issuer,
did: session.did,
});
-
if (!shards.ok) {
-
console.error("shardQueryFn error.", shards.error);
throw new Error(
`Something went wrong while getting the user's membership records.}`,
);
}
-
const results = shards.data
.map((record) => {
const convertResult = stringToAtUri(record.uri);
if (!convertResult.ok) {
···
marginLeft: 8,
}}
>
+
{lattices.map((lattice, idx) => (
+
<LatticeInfo key={idx} lattice={lattice} />
))}
</View>
</View>
···
};
const latticeQueryFn = async (session: OAuthSession) => {
+
const lattices = await getUserLattices({
pdsEndpoint: session.serverMetadata.issuer,
did: session.did,
});
+
if (!lattices.ok) {
+
console.error("shardQueryFn error.", lattices.error);
throw new Error(
`Something went wrong while getting the user's membership records.}`,
);
}
+
const results = lattices.data
.map((record) => {
const convertResult = stringToAtUri(record.uri);
if (!convertResult.ok) {