-
Notifications
You must be signed in to change notification settings - Fork 49
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 guildmembers fetching #2574
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
WalkthroughThe pull request introduces a modification in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
You are out of MentatBot reviews. Your usage will refresh December 23 at 08:00 AM. |
Failed to generate code suggestions for PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
client/src/hooks/helpers/useGuilds.tsx (1)
287-287
: LGTM! Consider optimizing the query order.The change correctly fixes guild member fetching by querying the GuildMember component directly. This is more precise and consistent with how membership is tracked elsewhere in the codebase.
For a minor optimization, consider reordering the query conditions to filter by the most specific criterion first:
- runQuery([Has(AddressName), Has(GuildMember), HasValue(GuildMember, { guild_entity_id: guild_entity_id })]), + runQuery([HasValue(GuildMember, { guild_entity_id: guild_entity_id }), Has(GuildMember), Has(AddressName)]),This way, the query first filters by the specific guild_entity_id, potentially reducing the initial set of entities to check.
Summary by CodeRabbit
Bug Fixes
Refactor
useGuilds
hook for better accuracy in fetching players associated with a guild.