Skip to content

Commit 6bdf000

Browse files
authored
fix: Order Categories in dropdown (#9125)
1 parent 4d63b7f commit 6bdf000

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

app/changelog/%5Fadmin/[id]/edit/page.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import {Select} from 'sentry-docs/components/changelog/ui/Select';
1010
import {prisma} from 'sentry-docs/prisma';
1111

1212
export default async function ChangelogCreatePage({params}) {
13-
const categories = await prisma.category.findMany();
13+
const categories = await prisma.category.findMany({
14+
orderBy: {
15+
name: 'asc',
16+
},
17+
});
1418
const changelog = await prisma.changelog.findUnique({
1519
where: {id: params.id},
1620
include: {

app/changelog/%5Fadmin/create/page.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import {Select} from 'sentry-docs/components/changelog/ui/Select';
1010
import {prisma} from 'sentry-docs/prisma';
1111

1212
export default async function ChangelogCreatePage() {
13-
const categories = await prisma.category.findMany();
13+
const categories = await prisma.category.findMany({
14+
orderBy: {
15+
name: 'asc',
16+
},
17+
});
1418

1519
return (
1620
<section className="overflow-x-auto col-start-3 col-span-8">

0 commit comments

Comments
 (0)