mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-05-10 22:01:16 +00:00
Simplify redundant conditional in handleFetchChannels
Co-authored-by: xCyanGrizzly <53275238+xCyanGrizzly@users.noreply.github.com>
This commit is contained in:
@@ -85,10 +85,7 @@ export function ChannelsTab({ channels, globalDestination, accounts }: ChannelsT
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleFetchChannels = () => {
|
const handleFetchChannels = () => {
|
||||||
if (authenticatedAccounts.length === 1) {
|
if (authenticatedAccounts.length > 0) {
|
||||||
setFetchChannelsAccountId(authenticatedAccounts[0].id);
|
|
||||||
} else if (authenticatedAccounts.length > 1) {
|
|
||||||
// Use the first authenticated account by default
|
|
||||||
setFetchChannelsAccountId(authenticatedAccounts[0].id);
|
setFetchChannelsAccountId(authenticatedAccounts[0].id);
|
||||||
} else {
|
} else {
|
||||||
toast.error("No authenticated accounts available. Add and authenticate an account first.");
|
toast.error("No authenticated accounts available. Add and authenticate an account first.");
|
||||||
|
|||||||
Reference in New Issue
Block a user