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 the file app/admin/quests/page.tsx to display the most recent quests first #1005

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

Comments

@Marchand-Nicolas
Copy link
Collaborator

Description 📹

Update the file app/admin/quests/page.tsx so that it displays the most recent quests first by simply reversing the order of the quests array before rendering.

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 following section of the code:
  • Update the fetchQuests function to reverse the order of the quests:
const fetchQuests = useCallback(async () => {
  try {
    setLoading(true);
    const res = await AdminService.getQuests();
    setQuests(res.reverse()); // Reverse the order to show the most recent quests first
    setLoading(false);
  } catch (error) {
    showNotification("Error while fetching quests", "error");
    console.log("Error while fetching quests", error);
  }
}, []);
  • Ensure no other changes are made to the logic.
  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: Display most recent quests first in admin panel"

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 Hack Issue reserved for the OD Hack labels Dec 26, 2024
@No-bodyq
Copy link
Contributor

I'd like to take this issue.

@mimisavage
Copy link

I’d like to work on this.

@ShantelPeters
Copy link
Contributor

Please can I be assigned to this issue

@Benjtalkshow
Copy link
Contributor

Let me work on this @Marchand-Nicolas

@Agbeleshe
Copy link

I'd like to take this issue.

@Michaelkingsdev
Copy link

@Marchand-Nicolas
Let me handle this

@ryzen-xp
Copy link

Can I take this from here?

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 Hack Issue reserved for the OD Hack open for contribution An issue that is available for an Only Dust contribution
Projects
None yet
Development

No branches or pull requests

8 participants