on master help sign in
id: fix invalid access on galaxies
0625faeMatilde Park
pages/ids/[id].js+5−3
@@ -31,15 +31,17 @@ const IdPage = ({ data, markdown, applications, groups, network, params }) => {
31 id
31 id
32 )}.png?${reqParams.join("&")}`;
32 )}.png?${reqParams.join("&")}`;
33
33
34+ // Galaxies shouldn't show parents, so store it as boolean here for reference.
35+ const isGalaxy = ob.clan(id) === "galaxy";
36+
34 // Parent ID, grabbed from network or fallback to the default sponsor for that node
37 // Parent ID, grabbed from network or fallback to the default sponsor for that node
38+ const parent =
35− const parent = network ? network.sponsor["urbit-id"] : ob.sein(id);
39+ !isGalaxy && network ? network.sponsor["urbit-id"] : ob.sein(id);
36 // Galaxy name above that parent
40 // Galaxy name above that parent
37 const galaxy =
41 const galaxy =
38 ob.clan(id) === "planet"
42 ob.clan(id) === "planet"
39 ? network?.sponsor?.sponsor?.["urbit-id"] || ob.sein(parent)
43 ? network?.sponsor?.sponsor?.["urbit-id"] || ob.sein(parent)
40 : null;
44 : null;
41− // Galaxies shouldn't show parents, so store it as boolean here for reference.
42− const isGalaxy = ob.clan(id) === "galaxy";
43
45
44 return (
46 return (
45 <Container>
47 <Container>