make it more obvious that you're already linked to twitch
All checks were successful
deploy / deploy (push) Successful in 48s

This commit is contained in:
Lee 2023-10-18 04:58:23 +01:00
parent 2ef9deedc3
commit 06c09e8312

@ -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;
}