From ed7f8824dc4489d893c4f253babcbf330994ff83 Mon Sep 17 00:00:00 2001 From: Barbara Honhoff Date: Fri, 13 Dec 2024 12:15:42 +0100 Subject: [PATCH] minor changes: File name changes and typescript returns --- apps/researcher/src/app/[locale]/research-guide/page.tsx | 2 +- .../research-guide/{sortGuides.test.ts => sort-guides.test.ts} | 2 +- .../[locale]/research-guide/{sortGuides.ts => sort-guides.ts} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename apps/researcher/src/app/[locale]/research-guide/{sortGuides.test.ts => sort-guides.test.ts} (97%) rename apps/researcher/src/app/[locale]/research-guide/{sortGuides.ts => sort-guides.ts} (83%) diff --git a/apps/researcher/src/app/[locale]/research-guide/page.tsx b/apps/researcher/src/app/[locale]/research-guide/page.tsx index 5bacb926..cf7c0b4f 100644 --- a/apps/researcher/src/app/[locale]/research-guide/page.tsx +++ b/apps/researcher/src/app/[locale]/research-guide/page.tsx @@ -5,7 +5,7 @@ import {Link} from '@/navigation'; import {ChevronRightIcon} from '@heroicons/react/24/solid'; import {getLocale, getTranslations} from 'next-intl/server'; import StringToMarkdown from './string-to-markdown'; -import {sortResearchGuide} from '@/app/[locale]/research-guide/sortGuides'; +import {sortResearchGuide} from '@/app/[locale]/research-guide/sort-guides'; export default async function Page() { const locale = (await getLocale()) as LocaleEnum; diff --git a/apps/researcher/src/app/[locale]/research-guide/sortGuides.test.ts b/apps/researcher/src/app/[locale]/research-guide/sort-guides.test.ts similarity index 97% rename from apps/researcher/src/app/[locale]/research-guide/sortGuides.test.ts rename to apps/researcher/src/app/[locale]/research-guide/sort-guides.test.ts index 6ad5b8bd..b7ebbb3d 100644 --- a/apps/researcher/src/app/[locale]/research-guide/sortGuides.test.ts +++ b/apps/researcher/src/app/[locale]/research-guide/sort-guides.test.ts @@ -1,5 +1,5 @@ import {ResearchGuide} from '@colonial-collections/api'; -import {sortResearchGuide} from './sortGuides'; +import {sortResearchGuide} from './sort-guides'; describe('sortResearchGuide', () => { it('sorts guides by their names', () => { diff --git a/apps/researcher/src/app/[locale]/research-guide/sortGuides.ts b/apps/researcher/src/app/[locale]/research-guide/sort-guides.ts similarity index 83% rename from apps/researcher/src/app/[locale]/research-guide/sortGuides.ts rename to apps/researcher/src/app/[locale]/research-guide/sort-guides.ts index 0e54fe7c..d436023b 100644 --- a/apps/researcher/src/app/[locale]/research-guide/sortGuides.ts +++ b/apps/researcher/src/app/[locale]/research-guide/sort-guides.ts @@ -1,6 +1,6 @@ import {ResearchGuide} from '@colonial-collections/api'; -export function sortResearchGuide(topLevel: ResearchGuide): ResearchGuide { +export function sortResearchGuide(topLevel: ResearchGuide) { const sortGuides = (guide: ResearchGuide): ResearchGuide => { const sortedParts = guide.hasParts?.sort((a, b) =>