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

fix: add existing rewards to a guild #1402

Merged
merged 10 commits into from
Jul 18, 2024
Merged

fix: add existing rewards to a guild #1402

merged 10 commits into from
Jul 18, 2024

Conversation

BrickheadJohnny
Copy link
Collaborator

Users sometimes do not notice the rewards which they already use in their guild in the quick add section, so we display these rewards in components like DiscordGuildSetup too. We forgot to handle & test this case in a recent refactor, so this feature caused some errors. This PR aims to fix the issue by checking if a guildPlatform with a specific platformGuildId already exists in the guild, and optionally adding a guildPlatformId field to the rolePlatform in that case, so our API knows that we shouldn't try to create a new guildPlatform in our DB, but we should re-use an existing one. I added a longer comment about it too. We also display a settings modal when the user wants to add an existing reward to a role. I haven't added this modal to the AddSolutionsModal, because in my opinion users will probably click on that button if they want to add a brand new reward to their guild, but let me know if we should add it there too.

As a side quest, I completely removed some unused files & added the new solutions modal to the group page too.

@BrickheadJohnny BrickheadJohnny added the bug Something isn't working label Jul 18, 2024
@BrickheadJohnny BrickheadJohnny self-assigned this Jul 18, 2024
Copy link

vercel bot commented Jul 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
guild-xyz ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2024 10:51am
guild-xyz-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2024 10:51am

Copy link
Contributor

@dovalid dovalid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you about adding the settings modal to the AddSolutionModal, I'm sure we're good this way for now

@vercel vercel bot temporarily deployed to Preview – guild-xyz-storybook July 18, 2024 10:51 Inactive
@BrickheadJohnny BrickheadJohnny merged commit 1934546 into main Jul 18, 2024
7 checks passed
@BrickheadJohnny BrickheadJohnny deleted the add-reward-fix branch July 18, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants