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(() => {
|
export default observer(() => {
|
||||||
const client = useClient();
|
const client = useClient();
|
||||||
const state = useApplicationState();
|
const state = useApplicationState();
|
||||||
const { server: server_id, channel: channel_id } =
|
const { server: server_id, channel: channel_id } = useParams<{
|
||||||
useParams<{ server: string; channel?: string }>();
|
server: string;
|
||||||
|
channel?: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
const server = client.servers.get(server_id);
|
const server = client.servers.get(server_id);
|
||||||
if (!server) return <Redirect to="/" />;
|
if (!server) return <Redirect to="/" />;
|
||||||
|
|
@ -119,14 +121,18 @@ export default observer(() => {
|
||||||
channels.push(addChannel(id));
|
channels.push(addChannel(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.push(
|
if (category.title === "Default") {
|
||||||
<CollapsibleSection
|
elements.push(...channels);
|
||||||
id={`category_${category.id}`}
|
} else {
|
||||||
defaultValue
|
elements.push(
|
||||||
summary={<Category>{category.title}</Category>}>
|
<CollapsibleSection
|
||||||
{channels}
|
id={`category_${category.id}`}
|
||||||
</CollapsibleSection>,
|
defaultValue
|
||||||
);
|
summary={<Category>{category.title}</Category>}>
|
||||||
|
{channels}
|
||||||
|
</CollapsibleSection>,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue