Alphabetically sort side navigation items
@@ -18,7 +18,8 @@ export const SidebarMenu = () => {
<Menu.List>
{schemas.map(schema => (
<Menu.List.Item as={Link} to={schema.title} key={schema.id}>
- {schema.title} <Tag color="info">{schema.group}</Tag>
+ {schema.title}{' '}
+ {schema.group && <Tag color="info">{schema.group}</Tag>}
</Menu.List.Item>
))}
</Menu.List>
@@ -34,6 +35,7 @@ const sidebarQuery = graphql`
sourceInstanceName: { eq: "schemas" }
internal: { mediaType: { eq: "text/yaml" } }
}
+ sort: { fields: [name] }
) {
edges {
node {
