Skip to content

Commit

Permalink
fix: reduce popularty of turbo subspaces (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Feb 13, 2025
1 parent 78c093a commit 2639842
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/helpers/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type Metadata = {
flagged: boolean;
turbo: boolean;
hibernated: boolean;
parent: string;
popularity: number;
rank: number | null;
private: boolean;
Expand Down Expand Up @@ -69,7 +70,7 @@ function getPopularity(space: Metadata): number {

if (space.verified) popularity += 1e10;

if (space.turbo) popularity += 1e10;
if (space.turbo && !space.parent) popularity += 1e10;

return popularity;
}
Expand Down Expand Up @@ -112,6 +113,7 @@ function mapSpaces() {
flagged: space.flagged,
turbo: space.turbo,
hibernated: space.hibernated,
parent: space.parent,
popularity: spacesMetadata[id]?.popularity || 0,
rank: spacesMetadata[id]?.rank || null,
private: space.private ?? false,
Expand Down

0 comments on commit 2639842

Please sign in to comment.