chore: bug fix cleanup (#4)

This commit is contained in:
hampus-fluxer
2026-01-03 06:44:40 +01:00
committed by GitHub
parent 275126d61b
commit c9c5dceb47
80 changed files with 4639 additions and 3709 deletions

View File

@@ -82,14 +82,12 @@ const ChannelInvitesTab: React.FC<{channelId: string}> = observer(({channelId})
</p>
</div>
{!(fetchStatus === 'success' && invites && invites.length === 0) && (
<div className={styles.buttonGroup}>
<Button small={true} disabled={!canInvite} onClick={handleCreateInvite}>
<Trans>Create Invite</Trans>
</Button>
{canManageGuild && channel?.guildId && <DisableInvitesButton guildId={channel.guildId} />}
</div>
)}
<div className={styles.buttonGroup}>
<Button small={true} disabled={!canInvite || fetchStatus === 'pending'} onClick={handleCreateInvite}>
<Trans>Create Invite</Trans>
</Button>
{canManageGuild && channel?.guildId && <DisableInvitesButton guildId={channel.guildId} />}
</div>
{fetchStatus === 'pending' && (
<div className={styles.spinnerContainer}>

View File

@@ -135,7 +135,7 @@ const ChannelWebhooksTab: React.FC<{channelId: string}> = observer(({channelId})
</div>
)}
{canManageWebhooks && !(fetchStatus === 'success' && (!webhooks || webhooks.length === 0)) && (
{canManageWebhooks && (
<div className={styles.buttonContainer}>
<Button onClick={handleCreateQuick} variant="primary" disabled={fetchStatus === 'pending'} small>
<Trans>Create Webhook</Trans>

View File

@@ -73,9 +73,7 @@ const GuildInvitesTab: React.FC<{guildId: string}> = observer(({guildId}) => {
</p>
</div>
{canManageGuild && !(fetchStatus === 'success' && invites && invites.length === 0) && (
<DisableInvitesButton guildId={guildId} />
)}
{canManageGuild && <DisableInvitesButton guildId={guildId} />}
{fetchStatus === 'pending' && (
<div className={styles.spinnerContainer}>

View File

@@ -112,7 +112,7 @@ const GuildWebhooksTab: React.FC<{guildId: string}> = observer(({guildId}) => {
</div>
)}
{canManageWebhooks && !(fetchStatus === 'success' && sortedWebhooks.length === 0) && (
{canManageWebhooks && (
<div className={styles.infoBox}>
<Trans>
To create a webhook, open the channel's settings and use the <strong>Webhooks</strong> tab. You can still