Skip to content

Commit

Permalink
remove todo
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardozgz committed Oct 16, 2024
1 parent 6d2711d commit ed68cd5
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { serverListColor } from "./colors";
import { DescriptionArea } from "./DescriptionArea";
import { ServerNavMenu } from "./ServerNavMenu";

// TODO fetch from backend
export function DiscordDemo() {
const [mouseIsHovering, setMouseIsHovering] = useState(false);
const [selectedServerIndex, setSelectedServerIndex] = useState(0);
Expand All @@ -29,15 +28,15 @@ export function DiscordDemo() {
clearInterval(serverSelection);
};
}
}, [mouseIsHovering, selectedServerIndex]);
}, [demoServers.length, mouseIsHovering, selectedServerIndex]);

useEffect(() => {
if (!selectedServer) return;
setSelectedChannelIndex(
selectedServer.channels.findIndex(
(channel) =>
channel.type === ChannelType.GuildText ||
channel.type === ChannelType.GuildAnnouncement,
selectedServer.channels.findIndex((channel) =>
[ChannelType.GuildText, ChannelType.GuildAnnouncement].includes(
channel.type,
),
),
);
}, [selectedServer]);
Expand Down

0 comments on commit ed68cd5

Please sign in to comment.