Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update app/analytics/page.tsx to sort quests by ID in descending order #1014

Open
Marchand-Nicolas opened this issue Dec 27, 2024 · 29 comments
Assignees
Labels
Good first issue Good for newcomers OD Boost Issue reserved for the OD Boost open for contribution An issue that is available for an Only Dust contribution

Comments

@Marchand-Nicolas
Copy link
Collaborator

Description 📹

Update app/analytics/page.tsx to sort quests by ID in descending order (show the most recent quests first).

Proposed Actions 🛠️

Here’s a checklist of actions to follow for resolving this issue:

  1. Fork and Create Branch:
    Fork the repository and create a new branch using the issue number:
   git checkout -b fix-[issue-number]
  1. Implement Changes:
    • Modify the fetchQuests function to sort the quests by ID in descending order.
    • Add sorting logic immediately after fetching the quests from the API.

Code Snippet:

const fetchQuests = useCallback(async () => {
  try {
    setLoading(true);
    const res = (await getQuests()) || {};
    const sortedQuests = Object.keys(res).reduce((sorted, category) => {
      const categoryQuests = res[category];
      if (Array.isArray(categoryQuests)) {
        sorted[category] = categoryQuests.sort((a, b) => b.id - a.id);
      }
      return sorted;
    }, {} as QuestList);
    setQuests(sortedQuests);
    setLoading(false);
  } catch (error) {
    console.log("Error while fetching quests", error);
  }
}, []);
  1. Run Tests and Commit Changes:
    Make sure your changes don't break existing functionality and commit with a clear message:
   git commit -m "Fix: Sort quests by ID in descending order"

Required 📋

To keep our workflow smooth, please make sure you follow these guidelines:

  • Assignment: Don't create a pull request if you weren’t assigned to this issue.
  • Timeframe: Complete the task within 3 business days.
  • Closing the Issue: In your PR description, close the issue by writing Close #[issue_id].
  • Review Process:
    • Once you've submitted your PR, change the label to "ready for review".
    • If changes are requested, address them and then update the label back to "ready for review" once done.
  • Testing: Test your PR locally before pushing, and verify that tests and build are working after pushing.

Thank you for your contribution 🙏

⚠️ WARNING: Failure to follow the requirements above may result in being added to the OnlyDust blacklist, affecting your ability to receive future rewards.

@Marchand-Nicolas Marchand-Nicolas added open for contribution An issue that is available for an Only Dust contribution Good first issue Good for newcomers OD Boost Issue reserved for the OD Boost labels Dec 27, 2024
@No-bodyq
Copy link
Contributor

Can I try solving this issue?

@Benjtalkshow
Copy link
Contributor

Hi @Marchand-Nicolas
Give a chance to handle this task. thanks

@Michaelkingsdev
Copy link

@Marchand-Nicolas
Can i be assigned to this task?

@NowGoody
Copy link

@Marchand-Nicolas kindly assign me this issue i would like to make it my first contribution the starkquest echo system

@ryzen-xp
Copy link

Can I take this issue?

@SudiptaPaul-31
Copy link
Contributor

Would love to contribute in this issue

My name is Sudipta Paul, a fullstack and blockchain developer having experience of working in previous session of ODHack my profile :(https://app.onlydust.com/u/SudiptaPaul-31)

ETA - 1Day

@Supa-mega
Copy link

May I take care of this?

@VyuduInc
Copy link

I'd like to take this issue.

@mimisavage
Copy link

Can I take care of this issue?

@Ekene001
Copy link

I'd be happy to do this. I’m a full-stack blockchain developer with over 3 years of experience working with Tailwind, React, TypeScript, and Solidity/Rust.

@amratansh12
Copy link

@Marchand-Nicolas Can you assign this issue to me?

@michojekunle
Copy link
Contributor

Mind if I try this one?

@aidenwong812
Copy link

Can I take this issue?

@aurlic
Copy link

aurlic commented Jan 6, 2025

I'd love to work on this!

@Thibrac
Copy link

Thibrac commented Jan 7, 2025

Can I start working on this?

@emarc99
Copy link
Contributor

emarc99 commented Jan 7, 2025

May I handle this issue?

@Viktohblake
Copy link

Hello,

Sorting the quests by ID in descending order is straightforward, and I can implement this efficiently.

I will verify that the quests are displayed in the correct order (descending i.e. most recent) by inspecting the UI and ensuring no existing functionality is affected.

I look forward to contributing to this issue and ensuring this feature works seamlessly.

@Amarjeet325
Copy link

Could I grab this task?

@thedevtask
Copy link

Mind if I take this issue?

@Miss-nonso
Copy link

I’d like to resolve this.

@OthmanImam
Copy link

Can I contribute to this one?

@olisaagbafor
Copy link

May I take this issue on?

@feranmiba
Copy link

I’d like to resolve this.

@chiscookeke11
Copy link

I'd like to handle this task.

@crood-xp
Copy link

Can I handle this task?

@covenantebube
Copy link

Hi, My name is covenant ebube. I am a MERN stack developer with years of experience solving real-world problems using Javascript, React and Typescript. I am a first time contributor on this platform and i am very confident that i can solve this task within the specified time frame. Can you please assign?

@akintewe
Copy link
Contributor

Hello everyone, I am a Frontend developer. I've honed my ability to deliver high-quality solutions and resolve complex issues under time constraints. I would love to work on this issue, as a new contributor. Thank you so much My ETA is 10 hours.

@Emmanex01
Copy link
Contributor

May I take care of this?
I'm Emmanuel Tochukwu, frontend and smart contract developer. I have experience building projects using JavaScript, Cairo, Tailwindcss, Typescript and Nextjs. If given this issue, I will deliver as soon as possible.

@PedroCo3lho
Copy link
Contributor

I'd like to work on this issue, I've contributed to starknet.quest before in front-end issues, like #825

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Good for newcomers OD Boost Issue reserved for the OD Boost open for contribution An issue that is available for an Only Dust contribution
Projects
None yet
Development

No branches or pull requests