starknet-id / starknet.quest

The on-chain quest tool of Starknet
https://starknet.quest
31 stars 80 forks source link

Add the notion of boost in the choice of the featured quest #779

Closed fricoben closed 1 month ago

fricoben commented 1 month ago

Description

The featured quest is the quest shown first on the Starknet quest home page as so:

Capture d’écran 2024-07-31 à 12 18 46

Currently, this place shows randomly non-expired quests, I want you to refactor the QuestProvider.tsx code here line 104

Capture d’écran 2024-07-31 à 12 18 07

So we do not feature a random non-expired quest but the last boosted quest and if no boosted quest is available then we feature a random non-expired quest. Moreover this code

    const notExpired = quests.filter((quest) => !quest.expired);
    const randomQuest =
      notExpired[Math.floor(Math.random() * notExpired.length)];
    setFeaturedQuest(randomQuest);

Is repeated two times in two different useMemos, I don't think it's necessary so you may delete one.

This is a pretty fast issue, don't hesitate to use GPT to make a clean code.

Iwueseiter commented 1 month ago

Please can I work on this? @fricoben I’d push a PR quickly.

petersdt commented 1 month ago

@fricoben can i work on this

ShantelPeters commented 1 month ago

@fricoben This is my first time contributing to this ecosystem.. can I be assigned to this issue… I will push a PR between 3-5 working days after Been assigned

Gift-Naomi commented 1 month ago

Hi @fricoben i am a frontend developer, I can handle this issues if I am being assigned, this will be my first issue on this project

fricoben commented 1 month ago

assigned to @Gift-Naomi