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], [setSidebar],
); );
if (sidebar === "search") { const content =
return <SearchSidebar close={close} />; sidebar === "search" ? (
} <SearchSidebar close={close} />
) : (
<MemberSidebar />
);
return ( return (
<SidebarBase> <SidebarBase>
<Switch> <Switch>
<Route path="/server/:server/channel/:channel"> <Route path="/server/:server/channel/:channel">{content}</Route>
<MemberSidebar /> <Route path="/channel/:channel">{content}</Route>
</Route>
<Route path="/channel/:channel">
<MemberSidebar />
</Route>
</Switch> </Switch>
</SidebarBase> </SidebarBase>
); );