forked from abner/for-legacy-web
FIX: Ignore Default category (parity with beta)
Just a little change so people still using Revite don't need to see an ugly "Default" category.master
parent
f9c2fcec56
commit
cbdeb1ba6d
|
|
@ -50,8 +50,10 @@ const ServerList = styled.div`
|
|||
export default observer(() => {
|
||||
const client = useClient();
|
||||
const state = useApplicationState();
|
||||
const { server: server_id, channel: channel_id } =
|
||||
useParams<{ server: string; channel?: string }>();
|
||||
const { server: server_id, channel: channel_id } = useParams<{
|
||||
server: string;
|
||||
channel?: string;
|
||||
}>();
|
||||
|
||||
const server = client.servers.get(server_id);
|
||||
if (!server) return <Redirect to="/" />;
|
||||
|
|
@ -119,14 +121,18 @@ export default observer(() => {
|
|||
channels.push(addChannel(id));
|
||||
}
|
||||
|
||||
elements.push(
|
||||
<CollapsibleSection
|
||||
id={`category_${category.id}`}
|
||||
defaultValue
|
||||
summary={<Category>{category.title}</Category>}>
|
||||
{channels}
|
||||
</CollapsibleSection>,
|
||||
);
|
||||
if (category.title === "Default") {
|
||||
elements.push(...channels);
|
||||
} else {
|
||||
elements.push(
|
||||
<CollapsibleSection
|
||||
id={`category_${category.id}`}
|
||||
defaultValue
|
||||
summary={<Category>{category.title}</Category>}>
|
||||
{channels}
|
||||
</CollapsibleSection>,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue