diff --git a/src/components/Others/Settings.svelte b/src/components/Others/Settings.svelte index 2c12416..0d84948 100644 --- a/src/components/Others/Settings.svelte +++ b/src/components/Others/Settings.svelte @@ -95,7 +95,16 @@ showTwitchLinkBtn = !twitchToken || tokenExpireSoon; - twitchBtnLabel = !twitchToken || !tokenExpireSoon ? 'Link to Twitch' : 'Renew Twitch token' + if (!twitchToken) { + twitchBtnLabel = "Link to Twitch"; + } + if (tokenExpireSoon) { + twitchBtnLabel = "Renew Twitch token" + } + if (twitchToken) { + twitchBtnLabel = "Already linked" + } + twitchBtnTitle = twitchToken && tokenExpireInDays > 0 ? `Days left: ${tokenExpireInDays}` : null; twitchBtnDisabled = !tokenExpireSoon; }