-
Notifications
You must be signed in to change notification settings - Fork 444
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
feat: DiscordCardWarning
component
#1474
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
import { PlatformName, PlatformType } from "types" | ||
import PlatformAccessButton from "./PlatformAccessButton" | ||
|
||
const AccessedGuildPlatformCard = () => { | ||
const { guildPlatform } = useRolePlatform() | ||
const rolePlatform = useRolePlatform() |
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.
Nit: why not keep the {guildPlatform} destruction here? Since we only use that from rolePlatform, felt cleaner to me
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.
Oh, good point, I originally passed down rolePlatform
as a prop to the PlatformCardWarning
component, but then realised that I could just use the useRolePlatform
hook & just forgot to revert this change. Will do it before merging the PR, thanks!
Added a
cardWarningComponent
for Discord rewards which indicates if the original Discord role doesn't exist anymore.Also improved the code a bit:
GoogleCardWarning
fromReward.tsx
, we don't need that anymoreGoogleCardWarning
componentCardWarningComponentBase
componentNote:
We should refactor the fetching logic in the
DiscordBotPermissionsChecker
component, I noticed that it won't write in the/v2/discord/servers/:serverId/permissions
cache, so we'll actually fetch the data 2 times in some edge cases. This is a low prio task & is not the scope of this PR, so I left it as is for now.