mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
Alpha sort subscriptions and accounts in dropdown (#663)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Subscription } from "../Contracts/DataModels";
|
||||
import useSWR from "swr";
|
||||
import { Subscription } from "../Contracts/DataModels";
|
||||
|
||||
interface SubscriptionListResult {
|
||||
nextLink: string;
|
||||
@@ -28,7 +28,7 @@ export async function fetchSubscriptions(accessToken: string): Promise<Subscript
|
||||
);
|
||||
subscriptions = [...subscriptions, ...validSubscriptions];
|
||||
}
|
||||
return subscriptions;
|
||||
return subscriptions.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
||||
}
|
||||
|
||||
export function useSubscriptions(armToken: string): Subscription[] | undefined {
|
||||
|
||||
Reference in New Issue
Block a user