Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/connect/src/hooks/use-public-spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type SpaceQueryResult = {
personalAddress: string;
page: {
name: string;
};
} | null;
};

type PublicSpacesQueryResult = {
Expand All @@ -35,7 +35,7 @@ export type PublicSpaceData = {
type: string;
mainVotingAddress: string;
personalAddress: string;
name: string;
name: string | undefined;
};

export const usePublicSpaces = (url: string): UseQueryResult<PublicSpaceData[], Error> => {
Expand All @@ -50,7 +50,7 @@ export const usePublicSpaces = (url: string): UseQueryResult<PublicSpaceData[],
return result?.spaces
? result.spaces.map((space: SpaceQueryResult) => ({
id: space.id,
name: space.page.name,
name: space.page?.name ?? undefined,
type: space.type,
mainVotingAddress: space.mainVotingAddress,
personalAddress: space.personalAddress,
Expand Down
Loading