Closed mehdi-torabiv closed 2 months ago
The changes include enhancements to the TcDiscordIntegrationSettingsDialog.tsx
component by adding a new state to handle initial data fetching, updating the UI based on this state, and integrating the useToken
hook for better management of community platform data. Additionally, a new function to fetch Discord platform properties and an optional boolean property in the corresponding interface were introduced.
Files | Change Summary |
---|---|
src/components/.../TcDiscordIntegrationSettingsDialog.tsx |
Added Typography and useToken imports; introduced a state isFetchingInitialData ; implemented logic for data fetching, UI adjustments, and community platform updates; added a new function to fetch Discord platform properties. |
src/utils/interfaces.ts |
Added a new optional boolean property isFetchingInitialData to the ICommunityDiscordPlatfromProps interface. |
sequenceDiagram
participant User
participant TcDiscordIntegrationSettingsDialog
participant TokenContext
participant CommunityPlatformService
User->>TcDiscordIntegrationSettingsDialog: Open dialog
TcDiscordIntegrationSettingsDialog->>TcDiscordIntegrationSettingsDialog: set isFetchingInitialData to true
TcDiscordIntegrationSettingsDialog->>TokenContext: useToken()
TokenContext-->>TcDiscordIntegrationSettingsDialog: { community, updateCommunity }
TcDiscordIntegrationSettingsDialog->>CommunityPlatformService: fetchDiscordPlatformProperties()
CommunityPlatformService-->>TcDiscordIntegrationSettingsDialog: { platformProperties }
TcDiscordIntegrationSettingsDialog->>TcDiscordIntegrationSettingsDialog: set isFetchingInitialData to false
TcDiscordIntegrationSettingsDialog->>User: Render UI with platform properties
User->>TcDiscordIntegrationSettingsDialog: Disconnect platform
TcDiscordIntegrationSettingsDialog->>TokenContext: updateCommunity(updatedCommunity)
TcDiscordIntegrationSettingsDialog->>User: Update UI on disconnection
In the code where changes bloom, 🌸
Discord settings set to zoom, 🚀
Data fetch with swift delight,
UI shines in fetching light, ✨
Tokens weave a seamless tune,
Platforms now in perfect tune, 🌐
Celebrate the code's new flight! 🎉
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?
Summary by CodeRabbit
New Features
UI Adjustments