This commit is contained in:
Gykes 2025-12-03 16:38:06 -08:00
parent 358ce6a4f8
commit 069fa3cffa
2 changed files with 2 additions and 5 deletions

View file

@ -47,10 +47,7 @@ export const StudioDetailsPanel: React.FC<IStudioDetailsPanel> = ({
); );
} }
const sortedURLs = useMemo( const sortedURLs = useMemo(() => sortURLs(studio.urls ?? []), [studio.urls]);
() => sortURLs(studio.urls ?? []),
[studio.urls]
);
function renderURLs() { function renderURLs() {
if (!sortedURLs.length) { if (!sortedURLs.length) {

View file

@ -17,4 +17,4 @@ function urlSortKey(url: string): string {
*/ */
export function sortURLs(urls: string[]): string[] { export function sortURLs(urls: string[]): string[] {
return [...urls].sort((a, b) => urlSortKey(a).localeCompare(urlSortKey(b))); return [...urls].sort((a, b) => urlSortKey(a).localeCompare(urlSortKey(b)));
} }