Skip to content

Commit

Permalink
fix: Order Categories in dropdown (#9125)
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT committed Feb 13, 2024
1 parent 4d63b7f commit 6bdf000
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/changelog/%5Fadmin/[id]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import {Select} from 'sentry-docs/components/changelog/ui/Select';
import {prisma} from 'sentry-docs/prisma';

export default async function ChangelogCreatePage({params}) {
const categories = await prisma.category.findMany();
const categories = await prisma.category.findMany({
orderBy: {
name: 'asc',
},
});
const changelog = await prisma.changelog.findUnique({
where: {id: params.id},
include: {
Expand Down
6 changes: 5 additions & 1 deletion app/changelog/%5Fadmin/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import {Select} from 'sentry-docs/components/changelog/ui/Select';
import {prisma} from 'sentry-docs/prisma';

export default async function ChangelogCreatePage() {
const categories = await prisma.category.findMany();
const categories = await prisma.category.findMany({
orderBy: {
name: 'asc',
},
});

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

0 comments on commit 6bdf000

Please sign in to comment.