mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-05-11 14:21:15 +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 = () => {
|
||||
if (authenticatedAccounts.length === 1) {
|
||||
setFetchChannelsAccountId(authenticatedAccounts[0].id);
|
||||
} else if (authenticatedAccounts.length > 1) {
|
||||
// Use the first authenticated account by default
|
||||
if (authenticatedAccounts.length > 0) {
|
||||
setFetchChannelsAccountId(authenticatedAccounts[0].id);
|
||||
} else {
|
||||
toast.error("No authenticated accounts available. Add and authenticate an account first.");
|
||||
|
||||
Reference in New Issue
Block a user