From 6bdf00008c3d42e320137ae50a1997efb912799d Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Tue, 13 Feb 2024 11:00:05 +0100 Subject: [PATCH] fix: Order Categories in dropdown (#9125) --- app/changelog/%5Fadmin/[id]/edit/page.tsx | 6 +++++- app/changelog/%5Fadmin/create/page.tsx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/changelog/%5Fadmin/[id]/edit/page.tsx b/app/changelog/%5Fadmin/[id]/edit/page.tsx index 83be36588626c..93bfafaf30cb8 100644 --- a/app/changelog/%5Fadmin/[id]/edit/page.tsx +++ b/app/changelog/%5Fadmin/[id]/edit/page.tsx @@ -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: { diff --git a/app/changelog/%5Fadmin/create/page.tsx b/app/changelog/%5Fadmin/create/page.tsx index ae2320af8ed01..96b3b8948f7ce 100644 --- a/app/changelog/%5Fadmin/create/page.tsx +++ b/app/changelog/%5Fadmin/create/page.tsx @@ -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 (