Skip to content

Commit

Permalink
Rename superfluid guild projects in the frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
sembrestels committed Oct 24, 2024
1 parent 9b5447a commit 4331079
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion apps/web/src/components/VotingCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ const VotingCard = ({
[projects],
);

// TODO: Remove this once we have a way to rename projects
const mapping: { [key: string]: string } = {
Lee: "Zenidrop by Lee",
"Bruno & team": "AstroBlock by Bruno team",
SenSpace: "SenSpace by SenSpace team",
MarkCarey: "Pixel Nouns by Mark",
"Dayitva & team": "Superboring Incentive by Dayitva team",
"Nikku & team": "Buzzfi by Nikko team",
};

const renamedProjects = randomizedProjects.map((project) => ({
...project,
name: mapping[project.name] ?? project.name,
}));

const [votes, setVotes] = useState<Allocation>(
Object.fromEntries(
projects.map((project) => [
Expand Down Expand Up @@ -111,7 +126,7 @@ const VotingCard = ({
</span>
</div>
</div>
{randomizedProjects.map((project) => {
{renamedProjects.map((project) => {
const { voteCount, maxVoteForProject, disabled } =
calculateProjectVotingDetails(project.account);
return (
Expand Down

0 comments on commit 4331079

Please sign in to comment.