Fix search not working on mobile.

This commit is contained in:
Paul 2021-08-15 18:01:25 +01:00
parent 24050a8e05
commit d72adacb24

View file

@ -22,19 +22,18 @@ export default function RightSidebar() {
[setSidebar],
);
if (sidebar === "search") {
return <SearchSidebar close={close} />;
}
const content =
sidebar === "search" ? (
<SearchSidebar close={close} />
) : (
<MemberSidebar />
);
return (
<SidebarBase>
<Switch>
<Route path="/server/:server/channel/:channel">
<MemberSidebar />
</Route>
<Route path="/channel/:channel">
<MemberSidebar />
</Route>
<Route path="/server/:server/channel/:channel">{content}</Route>
<Route path="/channel/:channel">{content}</Route>
</Switch>
</SidebarBase>
);